@blubox/cookie-parser
v0.0.3
Published
Blubox Cookies
Downloads
12
Maintainers
Readme
@blubox/cookie-parser
Cookie Parser for Blubox
Installation
npm i @blubox/cookie-parser
Quick start
Install dependencies
npm install blubox @blubox/cookie-parser
Create a Blubox application
const { Controller, router, App } = require('blubox')
const controller = new Controller()
const app = new App(
router({
ping: controller.get(ctx => {
console.log(ctx.cookies)
ctx.response.content = 'Pong!'
ctx.response.finish()
}),
})
)
app.listen(3000)
Import Blubox Cookie Parser
const cookieParser = require('@blubox/cookie-parser')
Use Blubox Cookie Parser middleware
const controller = new Controller().use(cookieParser())