koa-isomorphic
v2.0.2
Published
A simple, lightweight isomorphic React plugin for koa. Simply `use` it and point it to your routes. React and ReactRouter must be installed in your module for koa-isomorphic to work.
Downloads
11
Readme
koa-isomorphic
A simple, lightweight isomorphic React plugin for koa. Simply use
it and point it to your routes. React and ReactRouter must be installed in your module for koa-isomorphic to work.
var path = require('path');
var app = require('koa')();
var isomorphic = require('koa-isomorphic');
var port = process.env.NODE_ENV || 3000;
app.use(isomorphic(path.join(__dirname, 'src', 'routes')));
app.listen(port, function(err) {
if (err) throw err;
console.log('Listening at http://localhost:%d.', port);
});
requirements
- React
^0.12.2
- ReactRouter
^0.11.6
- koajs
^0.15.0
- nodejs
^0.11.14
|| iojs1.0.0