feat: 添加前端页面和业务说明书

refactor(server): 重构服务层代码结构
feat(server): 添加基础设施、跨境电商、AI决策等核心服务
docs: 完善前端业务说明书和开发进度文档
style: 格式化代码和文档
This commit is contained in:
2026-03-18 19:12:38 +08:00
parent c932a67be2
commit 6d0d2b6157
140 changed files with 23859 additions and 5833 deletions

View File

@@ -1,7 +1,24 @@
import { app } from './app';
import { DomainBootstrap } from './core/runtime/DomainBootstrap';
import { logger } from './utils/logger';
const PORT = process.env.PORT || 3001;
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});
async function startServer() {
try {
// 初始化领域模块
logger.info('[Server] Initializing domain modules...');
await DomainBootstrap.init();
logger.info('[Server] Domain modules initialized successfully');
} catch (error) {
logger.error(`[Server] Error during domain initialization: ${(error as any).message}`);
// 即使领域初始化失败,也继续启动服务器
logger.warn('[Server] Continuing to start server despite domain initialization errors');
}
app.listen(PORT, () => {
logger.info(`[Server] Running on port ${PORT}`);
});
}
startServer();