Get unlimited public & private packages + team-based management with npm Teams.Learn more »

koa-express

1.1.0 • Public • Published

koa-express

Use express (and connect) middleware in koa

Install

npm install koa-express

Usage:

var koa = require('koa');
var express = require('koa-express');
 
var app = koa();
 
function middleware (req, res, next) {
  console.log('express');
  next();
}
 
app.use(express(middleware));
 
app.use(function * () {
  this.body = 'koa';
});
 
app.listen(3000);

License

MIT

Keywords

none

Install

npm i koa-express

DownloadsWeekly Downloads

155

Version

1.1.0

License

MIT

Last publish

Collaborators

  • avatar