This commit is contained in:
张成
2025-12-19 20:22:47 +08:00
parent 155abf2381
commit bccd2d31d2
5 changed files with 197 additions and 189 deletions

9
app.js
View File

@@ -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🛑 正在关闭应用...');