the murmurous sea

app.get() vs. router.get() 본문

#dev/개념정리

app.get() vs. router.get()

lunacer 2021. 4. 15. 16:11

app.get

app.get can be used to create routes for your application at the top level.

 

express.Router

From the documentation about express.Router;

Use the express.Router class to create modular, mountable route handlers. A Router instance is a complete middleware and routing system; for this reason, it is often referred to as a “mini-app”

A router needs to be mounted to an app.

 

@

expressjs.com/th/guide/routing.html

stackoverflow.com/questions/41836310/difference-between-app-get-or-router-get-expressjs

'#dev > 개념정리' 카테고리의 다른 글

React state vs. Redux state  (0) 2021.05.26
How to kill a port  (0) 2021.04.16
UX/UI: Branding  (0) 2021.01.26
UX/UI: what makes good web design  (0) 2021.01.23
UI: Responsive layout grid  (0) 2020.10.28
Comments