0.0.1 • Published 5 years ago
micro-cookies v0.0.1
micro-cookies
Zeit's micro module to easy set and get cookies
Usage example
const { applyMiddleware } = require("micro-mw")
const handler = async (req, res) => {
// Set a cookie
res.cookie("jwt", "abc123", { maxAge: 864e5 })
// Get a cookie
req.cookie("jwt")
}
module.exports = applyMiddleware([cookies], handler)
Check jshttp/cookie for available options when setting a cookie
0.0.1
5 years ago