fix: sync config with db only after connection is established
All checks were successful
Build / build (pull_request) Successful in 55s
All checks were successful
Build / build (pull_request) Successful in 55s
The error message had regressed in the case where connection could not be established.
This commit is contained in:
parent
c4c622d82b
commit
e92f238f7d
@ -28,12 +28,13 @@ import { updateWorldStateCollections } from "./services/worldStateService";
|
|||||||
JSON.stringify = JSONStringify;
|
JSON.stringify = JSONStringify;
|
||||||
|
|
||||||
validateConfig();
|
validateConfig();
|
||||||
syncConfigWithDatabase();
|
|
||||||
|
|
||||||
mongoose
|
mongoose
|
||||||
.connect(config.mongodbUrl)
|
.connect(config.mongodbUrl)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
logger.info("Connected to MongoDB");
|
logger.info("Connected to MongoDB");
|
||||||
|
syncConfigWithDatabase();
|
||||||
|
|
||||||
startWebServer();
|
startWebServer();
|
||||||
|
|
||||||
void updateWorldStateCollections();
|
void updateWorldStateCollections();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user