Authored by 陈峰

commit

... ... @@ -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}`);
});
};
... ...
... ... @@ -3,7 +3,7 @@
{
"name": "yohoblk-wap",
"script": "app.js",
"instances": "max",
"instances": "4",
"exec_mode": "cluster",
"merge_logs": true,
"log_date_format": "YYYY-MM-DD HH:mm:ss Z",
... ...