XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

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
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -1
Modified src/index.ts +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();