From 5856047e3d518f10fc65d3a850567ea0719d236b Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 31 May 2021 20:32:03 +0200 Subject: :sparkles: start.ts file --- src/start.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/start.ts') diff --git a/src/start.ts b/src/start.ts index 2fe360e2..22da628f 100644 --- a/src/start.ts +++ b/src/start.ts @@ -5,5 +5,10 @@ import { Server } from "./Server"; import { config } from "dotenv"; config(); -const server = new Server(); +var port = Number(process.env.PORT); +if (isNaN(port)) port = 3002; + +const server = new Server({ + port, +}); server.listen(); -- cgit 1.5.1