우준호: https://github.com/noggong/sp_login/
주민석: https://github.com/MinseokJoo/sparta_prac_login
조봉진:https://github.com/burno28/elite_login
유희선:https://github.com/popoo9910/sparta_loginex/tree/master
이지영: https://github.com/easy2jiyoung/221229_sparta-login
쿠키를 보내고 받는것은 요청 / 응답 헤더의 Cookie / Set-Cookie 에 의해 이뤄진다. 이건 브라우저와 서버의 약속이다!


#cookie parser 설치
npm install cookie-parser
#cookie-parser 가져오기
const cookieParser = require('cookie-parser')
# 앱에서 cookie-parser 사용 선언하기
app.use(cookieParser())
app.get('/users', (req, res) => {
// 브라우저가 보낸 쿠키를 문자열로 그대로 받는다
console.log(req.headers.cookie)
// cookie-parser 가 header 의 cookie 를 분석하여 사용하기 쉽게 오브젝트로 만들어 준다.
// req.cookies.userId 이런식으로 쓸수 있다 오브젝트 이므로, 단 대쉬(-) 포함된 키라서 괄호에 이름을 넣어서 가져왔다.
const id = req.cookies["user-id"]
})