1
This commit is contained in:
9
app.js
9
app.js
@@ -6,7 +6,7 @@
|
||||
const frameworkConfig = require('./config/framework.config.js')
|
||||
const Framework = require('./framework/node-core-framework.js');
|
||||
const schedule = require('./api/middleware/schedule/index.js');
|
||||
|
||||
const redis = require('./api/middleware/redis_proxy.js');
|
||||
|
||||
// 启动应用
|
||||
async function startApp() {
|
||||
@@ -18,6 +18,12 @@ async function startApp() {
|
||||
// 创建框架实例
|
||||
const framework = await Framework.init(frameworkConfig);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 启动服务器
|
||||
const port = frameworkConfig.port.node;
|
||||
|
||||
@@ -38,6 +44,7 @@ async function startApp() {
|
||||
// 启动调度系统
|
||||
await schedule.init();
|
||||
|
||||
|
||||
// 优雅关闭处理
|
||||
process.on('SIGINT', async () => {
|
||||
console.log('\n🛑 正在关闭应用...');
|
||||
|
||||
Reference in New Issue
Block a user