返回提交历史
Modified
src/index.ts
+2
-2
XFEstudio/SpaceNinjaServer
chore: use a unique port for embedded mongod (#4206)
I noticed that sometimes it would not be detected that 27017 is already in use resulting in two servers possibly being bound to the same port, which is weird. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4206 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
a7b7bc44
代码差异
1 个文件
+2
-2
@@ -47,8 +47,8 @@ if (typeof mongodUri != "string") {
47
47
},
48
48
instance: {
49
49
dbPath: dataDir,
50
port: 27017, // Prefer 27017
51
portGeneration: true // If 27017 is not available, use another port
50
port: 27117, // Prefer 27117 just to have a steady port for Compass, etc.
51
portGeneration: true // If 27117 is not available, another port is fine.
52
52
}
53
53
});
54
54
mongodUri = mongod.getUri();