diff --git a/server/collab.ts b/server/collab.ts index 281d6d1..cbad558 100644 --- a/server/collab.ts +++ b/server/collab.ts @@ -10406,6 +10406,12 @@ export async function startCollabRuntimeEmbedded(mainHttpPort: number): Promise< }, } as unknown); + // Signal embedded mode so resolveRequestScopedCollabWsBase keeps the + // main HTTP port instead of adding +1 for a standalone collab port. + if (!process.env.COLLAB_EMBEDDED_WS) { + process.env.COLLAB_EMBEDDED_WS = '1'; + } + runtime = { enabled: true, wsUrlBase: wsUrlBase.replace(/\/+$/, ''), diff --git a/server/index.ts b/server/index.ts index 268cc05..1d4d042 100644 --- a/server/index.ts +++ b/server/index.ts @@ -44,6 +44,7 @@ async function main(): Promise { app.use(express.json({ limit: '10mb' })); app.use(express.static(path.join(__dirname, '..', 'public'))); + app.use(express.static(path.join(__dirname, '..', 'dist'))); app.use((req, res, next) => { const originHeader = req.header('origin');