express-why

why() generator support for express routes and middleware.

express-why

why() generator support for express routes and middleware.

var express = require('express');
var app = express();
 
// skip app-argument to add generator support for all express applications. 
require('express-why')(app);
 
app.get('/', function* (reqresnext) {
  var data = yield require('fs').readFile('package.json', yield 'cb');
  res.send(data);
});
 
app.listen(3000);