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.configure(config.logging);
LogService.info("index", "Starting dimension " + CURRENT_VERSION); LogService.info("index", "Starting dimension " + CURRENT_VERSION);
const webserver = new Webserver(); async function startup() {
await DimensionStore.updateSchema();
DimensionStore.updateSchema() const webserver = new Webserver();
.then(() => webserver.start()) await webserver.start();
.then(() => { }
LogService.info("index", "Dimension is ready!");
}); startup().then(() => LogService.info("index", "Dimension is ready!"));