mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-12-05 18:41:56 +00:00
细节问题
This commit is contained in:
parent
8c82079fc7
commit
ecd63053ba
@ -1,7 +1,4 @@
|
|||||||
PORT=4000
|
|
||||||
DEBUG=true
|
|
||||||
RD_PORT=6379
|
RD_PORT=6379
|
||||||
RD_ADD=127.0.0.1
|
RD_ADD=127.0.0.1
|
||||||
WS_SECRET=114514
|
WS_SECRET=114514
|
||||||
WS_PORT=4001
|
|
||||||
TOKEN=54188
|
TOKEN=54188
|
||||||
|
|||||||
@ -32,13 +32,7 @@ export class AppConfigService implements OnModuleInit {
|
|||||||
|
|
||||||
private checkRequiredVariables(): void {
|
private checkRequiredVariables(): void {
|
||||||
this.logger.log('检查必要环境变量..');
|
this.logger.log('检查必要环境变量..');
|
||||||
const requiredVariables = [
|
const requiredVariables = ['RD_PORT', 'RD_ADD', 'WS_SECRET'];
|
||||||
'PORT',
|
|
||||||
'RD_PORT',
|
|
||||||
'RD_ADD',
|
|
||||||
'WS_SECRET',
|
|
||||||
'WS_PORT',
|
|
||||||
];
|
|
||||||
|
|
||||||
requiredVariables.forEach((key) => {
|
requiredVariables.forEach((key) => {
|
||||||
const value = this.nestConfigService.get(key);
|
const value = this.nestConfigService.get(key);
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import {
|
|||||||
import { AppConfigService } from '../../config/config.service';
|
import { AppConfigService } from '../../config/config.service';
|
||||||
import { WsMessageHandler } from './ws-message.handler';
|
import { WsMessageHandler } from './ws-message.handler';
|
||||||
|
|
||||||
@WebSocketGateway(7001, {
|
@WebSocketGateway({
|
||||||
cors: { origin: '*' },
|
cors: { origin: '*' },
|
||||||
driver: 'ws',
|
driver: 'ws',
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user