Cookie middleware for Hoa.
$ npm i @hoajs/cookie --saveimport { 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 appThe documentation is available on hoa-js.com
$ npm testMIT