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

15 lines
391 B
TypeScript
Raw Normal View History

2021-01-30 19:58:15 +01:00
process.on("uncaughtException", console.error);
process.on("unhandledRejection", console.error);
2021-02-16 15:04:55 +01:00
import "missing-native-js-functions";
2021-02-16 13:30:53 +01:00
import { config } from "dotenv";
config();
import { DiscordServer } from "./Server";
2020-11-28 19:31:04 +01:00
2021-03-03 21:17:09 +01:00
const server = new DiscordServer({ port: 3000 || process.env.PORT });
2020-11-28 19:31:04 +01:00
server.start().catch(console.error);
2021-02-02 00:51:00 +01:00
// @ts-ignore
global.server = server;
2021-03-03 21:17:09 +01:00
export default server;