diff --git a/apps/server/package.json b/apps/server/package.json index c17f820e54..2ddc4d6670 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -5,7 +5,7 @@ "private": true, "main": "./src/main.ts", "scripts": { - "dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", + "dev": "cross-env NODE_ENV=development TRILIUM_PORT=8081 TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", "dev-alt": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data2 TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", "start-no-dir": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", "edit-integration-db": "cross-env NODE_ENV=development TRILIUM_PORT=8086 TRILIUM_ENV=dev TRILIUM_DATA_DIR=spec/db TRILIUM_INTEGRATION_TEST=edit TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", diff --git a/apps/server/src/www.ts b/apps/server/src/www.ts index b37641aad2..c4973c88b9 100644 --- a/apps/server/src/www.ts +++ b/apps/server/src/www.ts @@ -61,6 +61,9 @@ export default async function startTriliumServer() { const sessionParser = (await import("./routes/session_parser.js")).default; (getMessagingProvider() as WebSocketMessagingProvider).init(httpServer, sessionParser); + const ws = (await import("./services/ws.js")).default; + ws.init(); + if (utils.isElectron()) { const electronRouting = await import("./routes/electron.js"); electronRouting.default(app);