mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-11 10:27:06 +00:00
Revert "Merge pull request #873 from fosscord/dev/Maddy/fix/listeningAfterDb"
This reverts commit 8c92b197e4.
Reason: Breaks threading for unknown reasons.
This commit is contained in:
+1
-4
@@ -35,6 +35,7 @@ process.on("SIGTERM", () => {
|
||||
//this is what has been added for the /stop API route
|
||||
|
||||
async function main() {
|
||||
server.listen(port);
|
||||
await getOrInitialiseDatabase();
|
||||
await Config.init();
|
||||
|
||||
@@ -51,10 +52,7 @@ async function main() {
|
||||
app.use(Sentry.Handlers.requestHandler());
|
||||
app.use(Sentry.Handlers.tracingHandler());
|
||||
}
|
||||
|
||||
server.listen(port);
|
||||
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) {
|
||||
@@ -62,7 +60,6 @@ async function main() {
|
||||
res.end(res.sentry + "\n");
|
||||
});
|
||||
}
|
||||
|
||||
console.log(`[Server] ${green(`listening on port ${bold(port)}`)}`);
|
||||
// PluginLoader.loadPlugins();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user