Timeout middleware for koa.
Will throw "Request timeout" (Http 408) for any requests that take too long.
$ npm install koa-timeout
If we always want to respond within half a second, we could use
as middleware after our error handler:
var koa = ;var timeout = 500;var app = ;app;app;// Some potentially slow logic:app;app;