summary refs log tree commit diff
path: root/src/start.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-31 20:32:03 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-31 20:32:03 +0200
commit5856047e3d518f10fc65d3a850567ea0719d236b (patch)
tree9ca76ec40777d2520abe252a4f6a686b7f5393d2 /src/start.ts
parent:art: create start.ts (diff)
downloadserver-5856047e3d518f10fc65d3a850567ea0719d236b.tar.xz
:sparkles: start.ts file
Diffstat (limited to 'src/start.ts')
-rw-r--r--src/start.ts7
1 files changed, 6 insertions, 1 deletions
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();