fix: generic database root

Previously, the absolute file path from the build system was used, which did
not work on other systems.
This commit is contained in:
Lukas Obermann
2023-11-02 10:41:39 +01:00
parent 86a7899f73
commit 09ffd575fd
+4 -3
View File
@@ -1,12 +1,13 @@
import Debug from "debug"
import { dirname, join } from "node:path"
import { join } from "node:path"
import { parentPort } from "node:process"
import { fileURLToPath } from "node:url"
import { getAllValidData, getCache } from "optolith-database-schema"
import { getAbsoluteCachePaths, getAbsoluteEntityPaths } from "./contents/src/config.js"
const debug = Debug("util:database")
const root = join(dirname(fileURLToPath(import.meta.url)), "contents")
// This is the relative path from the project root directory to the database
// root directory.
const root = join("src", "database", "contents")
debug("loading database ...")