Make listen port configurable
This commit is contained in:
parent
bab9b74090
commit
849410bb64
@ -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"),
|
||||
|
@ -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}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user