返回提交历史
Modified
README.md
+2
-2
Modified
config-vanilla.json
+1
-0
Modified
src/index.ts
+14
-9
Modified
src/services/configService.ts
+1
-0
XFEstudio/XFESpaceNinjaServer
feat: hubExecutable config (#3167)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3167 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
cd9c3759
代码差异
4 个文件
+18
-11
@@ -15,8 +15,8 @@ SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [confi
15
15
- `skipTutorial` affects only newly created accounts, so you may wish to change it before logging in for the first time.
16
16
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
17
17
- `bindAddress`, `httpPort`, `httpsPort` are related to how SpaceNinjaServer is reached on the network. Under Docker, these options are unchangable; modify your `docker-compose.yml`, instead.
18
- `ircExecutable` can be provided with a relative path to an EXE which will be ran as a child process of SpaceNinjaServer.
19
- `ircAddress`, `hubAddress`, and `nrsAddress` can be provided if these secondary servers are on a different machine.
18
- `ircExecutable` and `hubExecutable` can be provided with relative paths to executables which will be ran as child processes of SpaceNinjaServer.
19
- `ircAddress`, `hubAddress`, and `nrsAddress` can be provided if these secondary servers are on a different machine. If not provided, the web server address is used. Note that these addresses are for the clients to resolve, not the server.
20
20
- `worldState.eidolonOverride` can be set to `day` or `night` to lock the time to day/fass and night/vome on Plains of Eidolon/Cambion Drift.
21
21
- `worldState.vallisOverride` can be set to `warm` or `cold` to lock the temperature on Orb Vallis.
22
22
- `worldState.duviriOverride` can be set to `joy`, `anger`, `envy`, `sorrow`, or `fear` to lock the Duviri spiral.
@@ -10,6 +10,7 @@
10
10
"httpsPort": 443,
11
11
"ircExecutable": null,
12
12
"ircAddress": null,
13
"hubExecutable": null,
13
14
"hubAddress": null,
14
15
"nrsAddress": null,
15
16
"dtls": null,
@@ -44,15 +44,20 @@ mongoose
44
44
45
45
startWebServer();
46
46
47
if (config.ircExecutable) {
48
logger.info(`Starting IRC server: ${config.ircExecutable}`);
49
child_process.execFile(config.ircExecutable, (error, _stdout, _stderr) => {
50
if (error) {
51
logger.warn(`Failed to start IRC server`, error);
52
} else {
53
logger.warn(`IRC server terminated unexpectedly`);
54
}
55
});
47
for (const [what, key] of [
48
["IRC", "ircExecutable"],
49
["HUB", "hubExecutable"]
50
] as const) {
51
if (config[key]) {
52
logger.info(`Starting ${what}: ${config[key]}`);
53
child_process.execFile(config[key], (error, _stdout, _stderr) => {
54
if (error) {
55
logger.warn(`Failed to start ${what} server`, error);
56
} else {
57
logger.warn(`${what} server terminated unexpectedly`);
58
}
59
});
60
}
56
61
}
57
62
58
63
void updateWorldStateCollections();
@@ -17,6 +17,7 @@ export interface IConfig {
17
17
httpsPort?: number;
18
18
ircExecutable?: string;
19
19
ircAddress?: string;
20
hubExecutable?: string;
20
21
hubAddress?: string;
21
22
nrsAddress?: string;
22
23
dtls?: number;