mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 01:16:15 +02:00
fix(server): ws not working
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user