Skip to content

Instantly share code, notes, and snippets.

@floatdrop floatdrop/app.js
Last active Aug 29, 2015

What would you like to do?
var koa = require('koa');
var app = koa();
var backend = require('./backend');
var router = require('koa-router')();
router.get('/todo/', function *(next) {
var sid = yield backend.sessid();
this.body = yield {
sessid: sid,
status: backend.status(sid),
todo: backend.todos(sid),
router.get('/', function *(next) {
this.body = yield {
users: backend.users(),
sessionid: backend.sessid()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.