diff --git a/src/main.ts b/src/main.ts index 20a61e4..616b752 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,8 +9,13 @@ import { DatabaseHelper } from "./helpers/DatabaseHelper"; console.info("Comunic API v6\t@author Pierre HUBERT\t2019-" + new Date().getFullYear()); -console.info("Load configuration..."); -ConfigurationHelper.loadConf("config.json"); +async function init() { + + console.info("Load configuration..."); + ConfigurationHelper.loadConf("config.json"); -console.info("Connect to database"); -DatabaseHelper.connect(); \ No newline at end of file + console.info("Connect to database"); + await DatabaseHelper.connect(); + +} +init(); \ No newline at end of file