node.js - express 路由一直报错
天蓬老师
天蓬老师 2017-04-17 15:04:13
0
3
415
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
Peter_Zhu
  1. Make sure your common.jsimport path is correct

  2. Confirm whether an error is reported in your requestCombine(req,res,next,x) method

  3. Personally I think it’s your path problem

PHPzhong
// catch 404 and forward to error handler
app.use(function(req, res, next) {
    let err = new Error('Not Found');
    err.status = 404;
    console.error('WRONG:', '404 Not Found');
    next(err);
});

As soon as you add this middleware, all requests will receive a new 404 error, and then throw it out. You need to add a restriction before throwing the error.

刘奇

It’s a grammatical error at first glance!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template