Recently learned to connect in JS and use SQL statements to manipulate the database, learning Ajax asynchronous submission request and return response, learning Jason data to string and jade syntax and connect to the response, learning the Web application development of the whole process, Learned to use the JS language from the front to the back-end full stack development.
# # #前端
Use bootstrap to design an HTML page to be placed in public, showing the user interface of the operation. Embedded in a section of the JS code, the implementation of the HTML elements through the DOM, or connect Vue, to get the user input values, and then through the Ajax technology to implement the page can also be updated on the back end of the return value on the page. The value of the URI that is spelled out by a function is included in the request, and in the Ajax callback function, it is sent to the back-end app.js route in the form of get.
# # #后端
Routing principle, In App.js, the different routes and events are bound by a App.use method, and the request sent by the front-end is dispatched to the corresponding response function in the routes, in the Denglu.js route, in the App.get to get the value of the Req.uri in the front end, and then resolve the user in the front-end submitted by the name and The password value, then connects to the database, queries the user information of the stored object through the SQL statement, and then iterates through the key values of the name and password of each object through a loop, then constructs the for If loop and determines whether the data is consistent, The Xmlhttp.open () method of Ajax is used to asynchronously transmit the corresponding response results back to the front end and display it.
17-8-26-webapp Summary