返回提交历史
Modified
src/index.ts
+2
-1
XFEstudio/XFESpaceNinjaServer
fix: sync config with db only after connection is established (#2346)
The error message had regressed in the case where connection could not be established. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2346 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
00cea678
代码差异
1 个文件
+2
-1
@@ -28,12 +28,13 @@ import { updateWorldStateCollections } from "./services/worldStateService";
28
28
JSON.stringify = JSONStringify;
29
29
30
30
validateConfig();
31
syncConfigWithDatabase();
32
31
33
32
mongoose
34
33
.connect(config.mongodbUrl)
35
34
.then(() => {
36
35
logger.info("Connected to MongoDB");
36
syncConfigWithDatabase();
37
37
38
startWebServer();
38
39
39
40
void updateWorldStateCollections();