mirror of
https://github.com/zadam/trilium.git
synced 2025-12-24 00:59:55 +01:00
server-esm: Fix circular dependency between sql and sql_init
This commit is contained in:
@@ -13,6 +13,7 @@ import routes from "./routes/routes.js";
|
||||
import custom from "./routes/custom.js";
|
||||
import error_handlers from "./routes/error_handlers.js";
|
||||
import { startScheduledCleanup } from "./services/erase.js";
|
||||
import sql_init from "./services/sql_init.js";
|
||||
|
||||
await import('./services/handlers');
|
||||
await import('./becca/becca_loader');
|
||||
@@ -21,6 +22,9 @@ const app = express();
|
||||
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
// Initialize DB
|
||||
sql_init.initializeDb();
|
||||
|
||||
// view engine setup
|
||||
app.set('views', path.join(scriptDir, 'views'));
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
Reference in New Issue
Block a user