router.get('/', home)
app.use((ctx, next) => {
console.log('1st middleware. Setting cookie to "blue"')
ctx.cookies.set('color', 'blue')
next()
})
app.use(router.routes())
function home(ctx, next) {
var cookie = ctx.cookies.get('color')
console.log('Inside /home handler. Cookie: ', cookie)
// cookie is undefined
}
app.listen(3000);