Express: 라우팅과 미들웨어
Routing app.METHOD(PATH, HANDLER) app.get('/', (req, res) => { res.send('Hello world'); }); HTTP GET method를 처리 app.all() // 모든 HTTP methods app.use() // specify middleware as the callback function routing path의 ? + * ()는 regex의 subset이다. 미들웨어 Writing middleware for use in Express apps Writing middleware for use in Express apps Overview Middleware functions are functions that have access to the ..
자바스크립트
2021. 9. 6. 23:43