falcor-koa
v0.1.0-alpha.2
Published
Falcor Middleware for Koa.
Downloads
5
Readme
falcor-koa
Falcor middleware for Koa. Inspired by falcor-express.
Experimental, do not use in prodcution!
Usage
var Koa = require('koa');
var FalcorRouter = require('falcor-router');
var falcorKoa = require('falcor-koa');
var bodyParser = require('koa-bodyparser');
var app = Koa();
app.use(bodyParser());
app.use(falcorKoa.dataSourceRoute(new FalcorRouter([{
route: 'greeting',
get: function() {
return {
path: ['greeting'],
value: 'Hello World!'
}
}
}])));
app.listen(3000);