You Can Become A
๋ฆ๊ฒ ์์ํด๋ ๋๊ตฌ๋ ์ง ๋ ธ๋ ฅํ๋ฉด ๊ฐ๋ฐ์๊ฐ ๋ ์ ์์ด์ !
express res
[EXPRESS] ๐ ์์ฒญ ๊ฐ์ฒด์ ์๋ต ๊ฐ์ฒด (req, res) ์ ๋ฆฌ
์๋ต ๊ฐ์ฒด - response res.app: ๋๊ฐ์ด res ๊ฐ์ฒด๋ฅผ ํตํด app ๊ฐ์ฒด์ ์ ๊ทผํ๋ค. res.app.get('')๊ฐ์ด ์ฌ์ฉ ๊ฐ๋ฅ. res.set(ํค๋, ๊ฐ) / res.setHeader(ํค๋, ๊ฐ): ์๋ต์ ํค๋๋ฅผ ์ค์ ํ๋ค. req.get()์ด ํค๋๊ฐ์ ๊ฐ์ ธ์ค๋๊ฑฐ๋ผ๋ฉด ์ด๊ฑด ํค๋ ์ค์ res.status(์ฝ๋) / res.sendStatus(์ฝ๋): ์๋ต ์์ HTTP ์ํ ์ฝ๋๋ฅผ ์ง์ ํ๋ค. res.type(type) : Contents-Type ํค๋๋ฅผ ์ค์ ํ ์ ์๋ ๊ฐ๋จํ ๋ฉ์๋. res.cookie(ํค, ๊ฐ, ์ต์ ): ์ฟ ํค๋ฅผ ์๋ต์ ์ค์ ํ๋ ๋ฉ์๋์ด๋ค. (cookie-parser ํจํค์ง๊ฐ ํ์) res.clearCookie(ํค, ๊ฐ, ์ต์ ): ์ฟ ํค๋ฅผ ์๋ต์์ ์ ๊ฑฐํ๋ ๋ฉ์๋์ด๋ค. res...