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

SpaceNinjaServer

A simple server for a small space ninja game

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

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

代码差异

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