1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-14 06:32:36 +01:00
server/gateway/src/start.ts

15 lines
300 B
TypeScript
Raw Normal View History

2021-05-31 00:51:54 +02:00
process.on("uncaughtException", console.error);
process.on("unhandledRejection", console.error);
import { Server } from "./Server";
import { config } from "dotenv";
config();
2021-05-31 20:32:03 +02:00
var port = Number(process.env.PORT);
if (isNaN(port)) port = 3002;
const server = new Server({
port,
});
server.start();