Restore postinstall

This commit is contained in:
Jonathan Cremin 2015-07-23 08:51:00 +01:00
parent e01a0757f0
commit 1625b507d6
5 changed files with 54 additions and 53 deletions

7
app.js
View file

@ -28,7 +28,7 @@ app.use(function* (next) {
yield next;
} catch (err) {
if (!err.status) {
console.error(err.stack);
debug('Error: %o', err);
} else if (err.status === 404) {
let Handler = yield createHandler(routes, this.request.url);
@ -37,6 +37,7 @@ app.use(function* (next) {
this.body = '<!doctype html>\n' + content;
} else {
debug('Error: %o', err);
throw err;
}
}
@ -89,10 +90,6 @@ app.use(route.get('/recent', function* () {
this.body = {recents: recents};
}));
app.use(route.get('*', function* () {
this.throw(404);
}));
module.exports = app;
if (!module.parent) {