summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/index.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts

index 85859319..3a05cdfa 100644 --- a/src/index.ts +++ b/src/index.ts
@@ -6,7 +6,10 @@ import { config } from "dotenv"; config(); import { DiscordServer } from "./Server"; -const server = new DiscordServer({ port: 3000 || process.env.PORT }); +var port = Number(process.env.PORT); +if (isNaN(port)) port = 3000; + +const server = new DiscordServer({ port }); server.start().catch(console.error); // @ts-ignore