mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-26 16:15:19 +00:00
🐛 fix port not picking up env file
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user