chore: 更新项目配置和核心服务

- 更新package.json和jest配置
- 更新main.ts启动配置
- 完善用户管理和数据库服务
- 更新安全核心模块
- 优化Zulip核心服务

配置改进:
- 统一项目依赖管理
- 优化测试配置
- 完善服务模块化架构
This commit is contained in:
moyin
2026-01-09 17:03:57 +08:00
parent cbf4120ddd
commit 8816b29b0a
17 changed files with 689 additions and 463 deletions

View File

@@ -2,6 +2,7 @@ import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { WsAdapter } from '@nestjs/platform-ws';
/**
* 检查数据库配置是否完整 by angjustinl 2025-12-17
@@ -36,10 +37,16 @@ function printBanner() {
}
async function bootstrap() {
// 打印启动横幅
printBanner();
const app = await NestFactory.create(AppModule, {
logger: ['error', 'warn', 'log'],
});
// 配置原生 WebSocket 适配器
app.useWebSocketAdapter(new WsAdapter(app));
// 允许前端后台如Vite/React跨域访问包括WebSocket
app.enableCors({
origin: [