const Koa = require('koa');
var Router = require('koa-router')
const app = new Koa();
app
.use((ctx,next) => {
ctx.cookies.set('fruit', 'apple')
ctx.body = 'hello'
next()
})
.use((ctx,next) => {
var cookie = ctx.cookies.get('fruit')
console.log('Cookie in second middleware: ', cookie)
});
app.listen(3000);