forked from xiangwang25/whale-town-end-v2
feat: integrate invitation access, world NPCs, and deployment
This commit is contained in:
12
src/main.ts
12
src/main.ts
@@ -63,11 +63,11 @@ async function bootstrap() {
|
||||
origin: [
|
||||
'http://localhost:3000',
|
||||
'http://localhost:5173', // Vite默认端口
|
||||
'https://whaletownend.xinghangee.icu',
|
||||
/^https:\/\/.*\.xinghangee\.icu$/
|
||||
'https://whaletown.novamailio.com',
|
||||
'https://zulip.novamailio.com'
|
||||
],
|
||||
credentials: true,
|
||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
||||
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
|
||||
allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With'],
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ async function bootstrap() {
|
||||
|
||||
游戏聊天功能主要通过 WebSocket 实现:
|
||||
|
||||
**连接地址**: \`wss://whaletownend.xinghangee.icu/game\` (原生WebSocket)
|
||||
**连接地址**: \`wss://whaletown.novamailio.com/game\` (原生WebSocket)
|
||||
|
||||
**重要变更**: 已从Socket.IO迁移到原生WebSocket,提升性能和稳定性
|
||||
|
||||
@@ -177,8 +177,8 @@ async function bootstrap() {
|
||||
'JWT-auth',
|
||||
)
|
||||
.addServer(`http://localhost:${port}`, '开发环境 - REST API')
|
||||
.addServer('https://whaletownend.xinghangee.icu', '生产环境 - REST API')
|
||||
.addServer('wss://whaletownend.xinghangee.icu/game', '生产环境 - WebSocket')
|
||||
.addServer('https://whaletown.novamailio.com/api', '生产环境 - REST API')
|
||||
.addServer('wss://whaletown.novamailio.com/game', '生产环境 - WebSocket')
|
||||
.addServer('ws://localhost:3001/game', '开发环境 - WebSocket')
|
||||
.build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user