Restore postinstall
This commit is contained in:
parent
e01a0757f0
commit
1625b507d6
5 changed files with 54 additions and 53 deletions
7
app.js
7
app.js
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue