Change the Dimension startup to make use of async/await

This commit is contained in:
Travis Ralston 2018-03-23 20:14:43 -06:00
parent 9a62b34fb7
commit b0de14eb57

View file

@ -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!");
});
const webserver = new Webserver();
await webserver.start();
}
startup().then(() => LogService.info("index", "Dimension is ready!"));