...
|
...
|
@@ -119,16 +119,17 @@ exports.createApp = async (app) => { |
|
|
|
|
|
// YOHO 后置中间件
|
|
|
app.use(errorHanlder.serverError());
|
|
|
|
|
|
// listener
|
|
|
app.listen(config.port, function() {
|
|
|
logger.info(`worker is started at ${config.port}`);
|
|
|
});
|
|
|
} catch (err) {
|
|
|
if (err.code === 9999) {
|
|
|
logger.error(err);
|
|
|
throw JSON.stringify(err);
|
|
|
process.abort();
|
|
|
}
|
|
|
logger.error(err);
|
|
|
}
|
|
|
|
|
|
// listener
|
|
|
app.listen(config.port, function() {
|
|
|
logger.info(`worker is started at ${config.port}`);
|
|
|
});
|
|
|
}; |
...
|
...
|
|