mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-21 21:09:22 +00:00
Split main function into two functions
This commit is contained in:
parent
26f6c12f35
commit
1198e28696
@ -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;
|
||||
|
||||
@ -102,4 +110,3 @@ async function init() {
|
||||
console.info("Started server on http://127.0.0.1:" + conf().port);
|
||||
});
|
||||
}
|
||||
init();
|
Loading…
Reference in New Issue
Block a user