Student file management of web management database

Code

Source link: https://pan.baidu.com/s/1Sz2lcc-s7mfvenisDFshNA
Extraction code: 643l

Case Introduction

Case Introduction

Realization idea

  1. Create project folder and generate project description file
  2. Create a web server to realize the communication between client and server
  3. Connect to the database and design the student information table according to the needs
  4. Create routes and implement page template rendering
  5. Implement static resource access
  6. Realize the function of adding student information
    1. Specify the request address and request method in the template form
    2. Add the name attribute for each form item
    3. Add routing to realize student information function
    4. Receive student information from the client
    5. Add student information to the database
    6. Redirect the page to the student information list page
  7. Realize student information display function

Required auxiliary files and modules

Generate package.json file to Generate package.json filedownload mongoose module

Download the mongoose module

Download router module

Function: Realize the use of routing
Steps:
1. Obtain routing object
2. Create a route by calling the method provided by the route object
3. Enable routing, make routing effective
Insert picture description here

Download the third-party module serve-staitc

Function: realize static resource access service
Steps:
1. Introduce the serve-static module to obtain the method of creating static resource service function
2. 2. Call the method to create a static resource service and specify the static resource service directory
3. Enable static resource service function
Insert picture description here

Download the DATE_FORMAT() function

Used to display date/time data in different formats.
We use NOW() to get the current date/time:

DATE_FORMAT(NOW(),'%b %d %Y %h:%i %p')
DATE_FORMAT(NOW(),'%m-%d-%Y')
DATE_FORMAT(NOW(),'%d %b %y')
DATE_FORMAT(NOW(),'%d %b %Y %T:%f')

The result is similar:

Dec 29 2008 11:45 PM
12-29-2008
29 Dec 08
29 Dec 2008 16:25:46.635

Insert picture description here

Self-motivation

Say okay to yourself that you can cry very embarrassed when you are sad, and when your tears drain, you should raise your head and smile beautifully.

Guess you like

Origin blog.csdn.net/weixin_50001396/article/details/112389924