天蓬老师2017-04-17 15:06:13
Make sure your common.js
import path is correct
Confirm whether an error is reported in your requestCombine(req,res,next,x)
method
Personally I think it’s your path problem
PHPz2017-04-17 15:06:13
// 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.