From fa31e7f8db61efe085f7d8a317e6a8640ebb3f46 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 12 Aug 2021 20:18:05 +0200 Subject: :sparkles: gateway --- gateway/src/start.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gateway/src/start.ts (limited to 'gateway/src/start.ts') diff --git a/gateway/src/start.ts b/gateway/src/start.ts new file mode 100644 index 00000000..09a54751 --- /dev/null +++ b/gateway/src/start.ts @@ -0,0 +1,14 @@ +process.on("uncaughtException", console.error); +process.on("unhandledRejection", console.error); + +import { Server } from "./Server"; +import { config } from "dotenv"; +config(); + +var port = Number(process.env.PORT); +if (isNaN(port)) port = 3002; + +const server = new Server({ + port, +}); +server.start(); -- cgit 1.5.1