@hoajs/cookie
v0.1.1
Published
Cookie middleware for Hoa.
Readme
@hoajs/cookie
Cookie middleware for Hoa.
Installation
$ npm i @hoajs/cookie --saveQuick Start
import { Hoa } from 'hoa'
import { cookie } from '@hoajs/cookie'
const app = new Hoa()
app.extend(cookie())
app.use(async (ctx) => {
const name = await ctx.req.getCookie('name')
ctx.res.body = `Hello, ${name}!`
})
export default appDocumentation
The documentation is available on hoa-js.com
Test (100% coverage)
$ npm testLicense
MIT
