summary refs log tree commit diff
path: root/bundle/src/Server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'bundle/src/Server.ts')
-rw-r--r--bundle/src/Server.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts

index 71a60d49..9cef9ed1 100644 --- a/bundle/src/Server.ts +++ b/bundle/src/Server.ts
@@ -33,7 +33,6 @@ process.on('SIGTERM', () => { //this is what has been added for the /stop API route async function main() { - server.listen(port); await initDatabase(); await Config.init(); // only set endpointPublic, if not already set @@ -57,7 +56,7 @@ async function main() { // { // id: "fosscord", // name: "Fosscord", - // endpoint: "127.0.0.1:3001", + // endpoint: "slowcord.maddy.k.vu:3004", // vip: false, // custom: false, // deprecated: false, @@ -84,7 +83,7 @@ async function main() { app.use(Sentry.Handlers.requestHandler()); app.use(Sentry.Handlers.tracingHandler()); } - await Promise.all([api.start(), cdn.start(), gateway.start()]); + if (Config.get().sentry.enabled) { app.use(Sentry.Handlers.errorHandler()); app.use(function onError(err: any, req: any, res: any, next: any) { @@ -92,6 +91,8 @@ async function main() { res.end(res.sentry + "\n"); }); } + + await Promise.all([api.start(), cdn.start(), gateway.start()]); console.log(`[Server] ${green(`listening on port ${bold(port)}`)}`); }