- GET
- POST
- PUT
- DELETE
- ALL
- USE
- LISTEN
- Request URL
- Request Method
- Status Code :
200 OK
- Remote Address
- Request URL
- Request Method
- Status Code :
400 means request error, 404: Not found
- Remote Address
- We get json data application/json
- For http we have port : 80
- For SSH(secure shell) : 22
- For https protocol : port 443
- Built in middleware
- static asset means server doesn't have to change it.
- Common names of folder is "public or static".
- img, css, js files can be added.
- API -JSON and SSR - Template
- Send data vs send template
- Res.json() vs res.render()
- e.g. /search?query=foo&tags=story
- sort
- ? searching from database
- Functions that execute during the request to the server.
- Each middleware has access to request ans response object.
- req => middleware => res
- use vs route
- options: our own, express, third party
- URL encoded middleware https://expressjs.com/en/5x/api.html#express.urlencoded