koa-rt

1.0.0 • Public • Published

koa-rt

Build Status

koa rt. can be custom with microtime.

Usage

var koa = require('koa');
var rt = require('koa-rt');
var app = koa();
 
app.use(rt());
 
app.use(function *(next){
  yield sleep(150);
  this.body = 'Hello';
});
 
function sleep(ms) {
  return function(done){
    setTimeout(done, ms);
  };
}
 
app.listen(7001);
 
console.log('listening on port 7001');
 

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    79
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    79
  • 0.0.2
    84
  • 0.0.1
    0

Package Sidebar

Install

npm i koa-rt

Weekly Downloads

163

Version

1.0.0

License

MIT

Last publish

Collaborators

  • dead_horse