Archived
Add config file support and update default ports
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { effectivePiWebConfig } from "../config.js";
|
||||
import { buildApp } from "./app.js";
|
||||
|
||||
const app = await buildApp();
|
||||
const port = Number(process.env["PI_WEB_PORT"] ?? process.env["PORT"] ?? 3000);
|
||||
const host = process.env["PI_WEB_HOST"] ?? "127.0.0.1";
|
||||
await app.listen({ port, host });
|
||||
const { config } = effectivePiWebConfig();
|
||||
await app.listen({ port: config.port ?? 8504, host: config.host ?? "127.0.0.1" });
|
||||
|
||||
Reference in New Issue
Block a user