Make listen port configurable

This commit is contained in:
Râu Cao 2024-10-21 20:22:51 +02:00
parent bab9b74090
commit 849410bb64
Signed by: raucao
GPG Key ID: 37036C356E56CC51
2 changed files with 3 additions and 3 deletions

View File

@ -4,6 +4,7 @@ const dirname = new URL(".", import.meta.url).pathname;
await load({ envPath: `${dirname}/.env`, export: true });
const config = {
port: Deno.env.get("PORT") || 8000,
home_relay_url: Deno.env.get("HOME_RELAY_URL") || "",
ldap: {
url: Deno.env.get("LDAP_URL"),

View File

@ -67,7 +67,6 @@ const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());
const PORT = 8000;
app.listen({ port: PORT });
app.listen({ port: config.port });
console.log(`App listening on http://localhost:${PORT}`);
console.log(`App listening on http://localhost:${config.port}`);