chore(server/dx): serve source directly

This commit is contained in:
Elian Doran 2025-08-31 10:49:50 +03:00
parent a969a3c71c
commit 20bdae4a84
No known key found for this signature in database
3 changed files with 5 additions and 8 deletions

View File

@ -1,4 +1,4 @@
TRILIUM_ENV=dev
TRILIUM_DATA_DIR=./apps/server/data
TRILIUM_RESOURCE_DIR=./apps/server/dist
TRILIUM_RESOURCE_DIR=./apps/server/src
TRILIUM_PUBLIC_SERVER=http://localhost:4200

View File

@ -116,20 +116,18 @@
],
"targets": {
"serve": {
"executor": "@nx/js:node",
"executor": "nx:run-commands",
"dependsOn": [
{
"projects": [
"client"
],
"target": "serve"
},
"build-without-client"
}
],
"continuous": true,
"options": {
"buildTarget": "server:build-without-client:development",
"runBuildTargetDependencies": false
"command": "tsx watch {projectRoot}/src/main.ts"
}
},
"serve-nodir": {

View File

@ -1,4 +1,3 @@
import log from "./log.js";
import path from "path";
import fs from "fs";
@ -10,7 +9,7 @@ const ELECTRON_APP_ROOT_DIR = path.resolve(RESOURCE_DIR, "../..");
const DB_INIT_DIR = path.resolve(RESOURCE_DIR, "db");
if (!fs.existsSync(DB_INIT_DIR)) {
log.error(`Could not find DB initialization directory: ${DB_INIT_DIR}`);
console.error(`Could not find DB initialization directory: ${DB_INIT_DIR}`);
process.exit(1);
}