细节问题

This commit is contained in:
Jerry 2025-08-26 17:55:24 +08:00
parent 8c82079fc7
commit ecd63053ba
3 changed files with 2 additions and 11 deletions

View File

@ -1,7 +1,4 @@
PORT=4000
DEBUG=true
RD_PORT=6379
RD_ADD=127.0.0.1
WS_SECRET=114514
WS_PORT=4001
TOKEN=54188

View File

@ -32,13 +32,7 @@ export class AppConfigService implements OnModuleInit {
private checkRequiredVariables(): void {
this.logger.log('检查必要环境变量..');
const requiredVariables = [
'PORT',
'RD_PORT',
'RD_ADD',
'WS_SECRET',
'WS_PORT',
];
const requiredVariables = ['RD_PORT', 'RD_ADD', 'WS_SECRET'];
requiredVariables.forEach((key) => {
const value = this.nestConfigService.get(key);

View File

@ -16,7 +16,7 @@ import {
import { AppConfigService } from '../../config/config.service';
import { WsMessageHandler } from './ws-message.handler';
@WebSocketGateway(7001, {
@WebSocketGateway({
cors: { origin: '*' },
driver: 'ws',
})