https://github.com/koajs/koa-rt
koa rt with microtime
https://github.com/koajs/koa-rt
Last synced: 30 days ago
JSON representation
koa rt with microtime
- Host: GitHub
- URL: https://github.com/koajs/koa-rt
- Owner: koajs
- License: mit
- Archived: true
- Created: 2013-12-27T07:13:34.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T10:35:16.000Z (about 8 years ago)
- Last Synced: 2025-09-21T01:30:54.418Z (about 2 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 7
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome-koa - koa-rt - koa rt with microtime (Middleware)
README
koa-rt
======
[](http://travis-ci.org/dead-horse/koa-rt)
koa rt. can be custom with microtime.
## Usage
```js
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