Routing refers to how an application's endpoints(URLs) respond to client requests.
app.get() to handle GET request
app.post() to handle POST request
all.app() to handle all http methods
app.use() to specify middleware as a callback function (handler func)
with multiple callback functions, it is important to provide NEXT as an argument to callback fuction and then call next() within the body of the function to hand off control to the next callback.
resource : https://expressjs.com/en/guide/routing.html
EXPRESS : https://expressjs.com/en/guide/using-middleware.html
Express is a routing and middleware web framework that has minimal functionality of its own.
An express application is essentially a series of middleware function calls.
IF THE CURRENT MIDDLEWARE FUNCTION DOES NOT END THE REQ-REP CYCLE, IT MUST CALL NEXT() TO PASS CONTROL TO THE NEXT MIDDLEWARE FUNCTION. OTHERWISE, THE REQUEST WILL BE LEFT HANGING.
app.get() to handle GET request
app.post() to handle POST request
all.app() to handle all http methods
app.use() to specify middleware as a callback function (handler func)
with multiple callback functions, it is important to provide NEXT as an argument to callback fuction and then call next() within the body of the function to hand off control to the next callback.
resource : https://expressjs.com/en/guide/routing.html
EXPRESS : https://expressjs.com/en/guide/using-middleware.html
Express is a routing and middleware web framework that has minimal functionality of its own.
An express application is essentially a series of middleware function calls.
IF THE CURRENT MIDDLEWARE FUNCTION DOES NOT END THE REQ-REP CYCLE, IT MUST CALL NEXT() TO PASS CONTROL TO THE NEXT MIDDLEWARE FUNCTION. OTHERWISE, THE REQUEST WILL BE LEFT HANGING.
댓글
댓글 쓰기