Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 628 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 628 Bytes

oak-cookie

A middleware for Oak, Based Koa and cookie .

Example

import { Application } from "https://deno.land/x/oak/mod.ts";
import cookie from 'https://github.com/wujingquan/oak-cookie/blob/master/mod.ts';

const app = new Application();

app
  .use(cookie)
  .use(ctx => {
    ctx.state.cookies.get('something')
    ctx.state.cookies.set('something')
    ctx.state.cookies.del('something')
    ctx.response.body = "Hello World!";
  });

await app.listen("127.0.0.1:8000");