新手见谅404页面处理
回复 (1)
G
自己做middleware吧, 比如:
app.use(function *notFound(next) {
if (this.status == 404) {
console.log(this.url, 'requested but no route matches.');
} else {
yield next;
}
});
参与回复
登录后即可参与回复。登录
新手见谅404页面处理
自己做middleware吧, 比如:
app.use(function *notFound(next) {
if (this.status == 404) {
console.log(this.url, 'requested but no route matches.');
} else {
yield next;
}
});