From b0de14eb57e3b63e64bf21b93853542bde88309d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 23 Mar 2018 20:14:43 -0600 Subject: [PATCH] Change the Dimension startup to make use of async/await --- src/index.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 17d2463..43e96c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,10 +7,11 @@ import { CURRENT_VERSION } from "./version"; LogService.configure(config.logging); LogService.info("index", "Starting dimension " + CURRENT_VERSION); -const webserver = new Webserver(); +async function startup() { + await DimensionStore.updateSchema(); -DimensionStore.updateSchema() - .then(() => webserver.start()) - .then(() => { - LogService.info("index", "Dimension is ready!"); - }); \ No newline at end of file + const webserver = new Webserver(); + await webserver.start(); +} + +startup().then(() => LogService.info("index", "Dimension is ready!")); \ No newline at end of file