add
This commit is contained in:
parent
69ff0f3696
commit
f149f20052
|
@ -8,7 +8,7 @@ async function bootstrap() {
|
||||||
|
|
||||||
// 启用 CORS 并允许所有来源
|
// 启用 CORS 并允许所有来源
|
||||||
app.enableCors({
|
app.enableCors({
|
||||||
origin: "*",
|
origin: '*',
|
||||||
});
|
});
|
||||||
const wsService = app.get(WebSocketService);
|
const wsService = app.get(WebSocketService);
|
||||||
await wsService.initialize(app.getHttpServer());
|
await wsService.initialize(app.getHttpServer());
|
||||||
|
@ -18,6 +18,5 @@ async function bootstrap() {
|
||||||
const port = process.env.SERVER_PORT || 3000;
|
const port = process.env.SERVER_PORT || 3000;
|
||||||
|
|
||||||
await app.listen(port);
|
await app.listen(port);
|
||||||
|
|
||||||
}
|
}
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
Loading…
Reference in New Issue