Skip to content

hoa-js/cookie

Repository files navigation

@hoajs/cookie

Cookie middleware for Hoa.

Installation

$ npm i @hoajs/cookie --save

Quick 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 app

Documentation

The documentation is available on hoa-js.com

Test (100% coverage)

$ npm test

License

MIT

About

Cookie middleware for Hoa.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •