
request 객체
- req.params
- req.params(name)
- req.query
- req.body
- req.router
- req.cookies, req.signedCookies
- req.headers
- req.accetpts([types])
- req.ip
- req.path
- req.host
- req.xhr
- req.protocol
- req.secure
- req.url, req.originalUrl
- req.accetpedLanguages
response 객체
- res.status(code)
- res.set(name, value)
- res.cookie(name, value, [options]), res.clearCookie(name, [options])
- res.redirect([status], url)
- res.send(body), res.send(status, body)
- res.json(json), res.json(status, json)
- res.jsonp(json) res.jsonp(status, json)
- res.type(type)
- res.format(object)
- res.attachment([filename]), res.download(path, [filename], [callboack])
- res.sendFile(path, [options], [callback])
- res.links(links)
- res.locals, res.render(view, [locals], callback)
Express 4.x - API Reference
Express 4.x API express() Creates an Express application. The express() function is a top-level function exported by the express module. var express = require('express') var app = express() Methods express.json([options]) This middleware is available in Ex
expressjs.com
'Programing > node js' 카테고리의 다른 글
| node js 네이버 계정으로 로그인 (passport-naver) (0) | 2021.01.12 |
|---|---|
| node js mysql 연동 암호화 로그인 (0) | 2021.01.11 |
| node js Express Router 관리, 분리 (0) | 2021.01.06 |
| node js Winston 로그 남기기 (0) | 2021.01.05 |
| node js express-generator 설치 (0) | 2021.01.05 |