diff --git a/server/index.js b/server/index.js index ca3610b18d..3552e66c3a 100644 --- a/server/index.js +++ b/server/index.js @@ -84,8 +84,13 @@ async function start() { throng({ worker: start, - // The number of workers to run, defaults to the number of CPU's available - count: process.env.WEB_CONCURRENCY || undefined, + // The number of processes to run, defaults to the number of CPU's available + // for the web service, and 1 for collaboration during the beta period. + count: serviceNames.includes("web") + ? process.env.WEB_CONCURRENCY || undefined + : serviceNames.includes("collaboration") + ? 1 + : undefined, }); if (env.ENABLE_UPDATES !== "false" && process.env.NODE_ENV === "production") { diff --git a/server/services/collaboration.js b/server/services/collaboration.js index c2b36b76f2..ff2886d22e 100644 --- a/server/services/collaboration.js +++ b/server/services/collaboration.js @@ -28,8 +28,7 @@ export default function init(app: Koa, server: http.Server) { hocuspocus.handleConnection(ws, ctx.request, documentName); } - ctx.body = "this is a websocket route"; - ctx.response.status = 400; + ctx.response.status = 101; }); app.use(websocket());