mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
server-esm: Fix use of __dirname
This commit is contained in:
@@ -3,7 +3,8 @@ import { Router } from "express";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
const specPath = path.join(__dirname, 'etapi.openapi.yaml');
|
||||
import { fileURLToPath } from "url";
|
||||
const specPath = path.join(path.dirname(fileURLToPath(import.meta.url)), 'etapi.openapi.yaml');
|
||||
let spec: string | null = null;
|
||||
|
||||
function register(router: Router) {
|
||||
|
||||
Reference in New Issue
Block a user