Cookie parser
cookieParser
is a middleware allows you to retrieve request cookies.
Cookie can be accessed with req.cookies
property. If
there are no cookies, this field is undefined
.
import { cookieParser } from '@shelepuginivan/lunatic'
app.use(cookieParser)
app.post('/', (req, res) => { console.log(req.cookies) res.status(200).json({ message: 'received cookies' })})
app.listen(8000)