fix(server): ws not working

This commit is contained in:
Elian Doran
2026-03-28 11:37:51 +02:00
parent f04f295b21
commit 9b6c7966de
2 changed files with 4 additions and 1 deletions

View File

@@ -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",

View File

@@ -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);