Move sentry init to util. use sentry in each module, not just bundle

This commit is contained in:
Madeline
2023-01-10 13:20:37 +11:00
parent 9efac4ad16
commit 2f065e6b37
7 changed files with 125 additions and 80 deletions
+9 -1
View File
@@ -1,7 +1,13 @@
import "missing-native-js-functions";
import dotenv from "dotenv";
dotenv.config();
import { closeDatabase, Config, initDatabase, initEvent } from "@fosscord/util";
import {
closeDatabase,
Config,
initDatabase,
initEvent,
Sentry,
} from "@fosscord/util";
import ws from "ws";
import { Connection } from "./events/Connection";
import http from "http";
@@ -50,6 +56,8 @@ export class Server {
await initDatabase();
await Config.init();
await initEvent();
await Sentry.init();
if (!this.server.listening) {
this.server.listen(this.port);
console.log(`[Gateway] online on 0.0.0.0:${this.port}`);