chore: 更新项目配置和核心服务
- 更新package.json和jest配置 - 更新main.ts启动配置 - 完善用户管理和数据库服务 - 更新安全核心模块 - 优化Zulip核心服务 配置改进: - 统一项目依赖管理 - 优化测试配置 - 完善服务模块化架构
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user