mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-12-05 10:31:56 +00:00
细节问题
This commit is contained in:
parent
8c82079fc7
commit
ecd63053ba
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -16,7 +16,7 @@ import {
|
||||
import { AppConfigService } from '../../config/config.service';
|
||||
import { WsMessageHandler } from './ws-message.handler';
|
||||
|
||||
@WebSocketGateway(7001, {
|
||||
@WebSocketGateway({
|
||||
cors: { origin: '*' },
|
||||
driver: 'ws',
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user