Fixed self-hosted example lack of __dirname and improved log

This commit is contained in:
Alexander Cerutti
2025-09-17 23:03:54 +02:00
parent 56572214c6
commit 76c9d4ec35
2 changed files with 4 additions and 1 deletions

View File

@@ -13,6 +13,9 @@ import path from "node:path";
import { PKPass } from "passkit-generator"; import { PKPass } from "passkit-generator";
import { app } from "./webserver.js"; import { app } from "./webserver.js";
import { getCertificates } from "./shared.js"; import { getCertificates } from "./shared.js";
import { fileURLToPath } from "node:url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
app.route("/fields/:modelName").get(async (request, response) => { app.route("/fields/:modelName").get(async (request, response) => {
const passName = const passName =

View File

@@ -10,5 +10,5 @@ export const app = express();
app.use(express.json()); app.use(express.json());
app.listen(8080, "0.0.0.0", () => { app.listen(8080, "0.0.0.0", () => {
console.log("Webserver started."); console.log("Webserver started on port 8080");
}); });