Authored by htoooth

fix gitlib #1

Showing 1 changed file with 7 additions and 1 deletions
... ... @@ -36,6 +36,8 @@ app.locals.version = pkg.version;
// 指定libray目录
global.library = path.resolve('./library/');
const logger = require(global.library + 'logger');
app.set('view engine', '.hbs');
app.use(favicon(path.join(__dirname, '/public/favicon.ico')));
... ... @@ -88,7 +90,11 @@ app.use((req, res, next) => {
});
// dispatcher
require('./dispatch')(app);
try {
require('./dispatch')(app);
} catch(e){
logger.error(e);
}
// listener
app.listen(config.port, function() {
... ...