diff --git a/lib/app.js b/lib/app.js index 7db8d67..e70c26a 100644 --- a/lib/app.js +++ b/lib/app.js @@ -337,8 +337,12 @@ module.exports = function (myDeps, conf, overrideHttp) { , app: function (config, hostname, pathname, req, res, next) { //var appfile = path.resolve(/*process.cwd(), */config.path.replace(/:hostname/, hostname)); var appfile = config.path.replace(/:hostname/, hostname); - var app = require(appfile); - app(req, res, next); + try { + var app = require(appfile); + app(req, res, next); + } catch (err) { + next(); + } } };