diff --git a/src/main.ts b/src/main.ts index 199a315..81875ac 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,14 @@ async function init() { console.info("Connect to database"); await DatabaseHelper.connect(); + await startServer(); +} +init(); + +/** + * Run the server + */ +async function startServer() { // Start HTTP Server const app = expressWs(express()).app; @@ -101,5 +109,4 @@ async function init() { app.listen(conf().port, () => { console.info("Started server on http://127.0.0.1:" + conf().port); }); -} -init(); \ No newline at end of file +} \ No newline at end of file