Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koajs/koa-rt
koa rt with microtime
https://github.com/koajs/koa-rt
Last synced: 2 months 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 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T10:35:16.000Z (over 7 years ago)
- Last Synced: 2024-04-14T13:08:40.298Z (8 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 6
- Watchers: 5
- Forks: 1
- 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
======[![Build Status](https://secure.travis-ci.org/dead-horse/koa-rt.png)](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