feat: ircExecutable config
All checks were successful
Build / build (pull_request) Successful in 4m39s
All checks were successful
Build / build (pull_request) Successful in 4m39s
This commit is contained in:
parent
c3bf0ae7c7
commit
a1fe211680
@ -14,7 +14,8 @@ SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [confi
|
|||||||
|
|
||||||
- `skipTutorial` affects only newly created accounts, so you may wish to change it before logging in for the first time.
|
- `skipTutorial` affects only newly created accounts, so you may wish to change it before logging in for the first time.
|
||||||
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
|
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
|
||||||
- `ircAddress`, `hubAddress`, and `nrsAddress` are not present by default but can be provided if these secondary servers are on a different machine.
|
- `ircExecutable` can be provided with a relative path to an EXE which will be ran as a child process of SpaceNinjaServer.
|
||||||
|
- `ircAddress`, `hubAddress`, and `nrsAddress` can be provided if these secondary servers are on a different machine.
|
||||||
- `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.
|
- `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.
|
||||||
- `worldState.vallisOverride` can be set to `warm` or `cold` to lock the temperature on Orb Vallis.
|
- `worldState.vallisOverride` can be set to `warm` or `cold` to lock the temperature on Orb Vallis.
|
||||||
- `worldState.duviriOverride` can be set to `joy`, `anger`, `envy`, `sorrow`, or `fear` to lock the Duviri spiral.
|
- `worldState.duviriOverride` can be set to `joy`, `anger`, `envy`, `sorrow`, or `fear` to lock the Duviri spiral.
|
||||||
|
|||||||
@ -8,6 +8,10 @@
|
|||||||
"bindAddress": "0.0.0.0",
|
"bindAddress": "0.0.0.0",
|
||||||
"httpPort": 80,
|
"httpPort": 80,
|
||||||
"httpsPort": 443,
|
"httpsPort": 443,
|
||||||
|
"ircExecutable": null,
|
||||||
|
"ircAddress": null,
|
||||||
|
"hubAddress": null,
|
||||||
|
"nrsAddress": null,
|
||||||
"administratorNames": [],
|
"administratorNames": [],
|
||||||
"autoCreateAccount": true,
|
"autoCreateAccount": true,
|
||||||
"skipTutorial": false,
|
"skipTutorial": false,
|
||||||
|
|||||||
12
src/index.ts
12
src/index.ts
@ -19,6 +19,7 @@ logger.info("Starting up...");
|
|||||||
// Proceed with normal startup: bring up config watcher service, validate config, connect to MongoDB, and finally start listening for HTTP.
|
// Proceed with normal startup: bring up config watcher service, validate config, connect to MongoDB, and finally start listening for HTTP.
|
||||||
import mongoose from "mongoose";
|
import mongoose from "mongoose";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
import child_process from "child_process";
|
||||||
import { JSONStringify } from "json-with-bigint";
|
import { JSONStringify } from "json-with-bigint";
|
||||||
import { startWebServer } from "./services/webService.ts";
|
import { startWebServer } from "./services/webService.ts";
|
||||||
import { validateConfig } from "./services/configWatcherService.ts";
|
import { validateConfig } from "./services/configWatcherService.ts";
|
||||||
@ -43,6 +44,17 @@ mongoose
|
|||||||
|
|
||||||
startWebServer();
|
startWebServer();
|
||||||
|
|
||||||
|
if (config.ircExecutable) {
|
||||||
|
logger.info(`Starting IRC server: ${config.ircExecutable}`);
|
||||||
|
child_process.execFile(config.ircExecutable, (error, _stdout, _stderr) => {
|
||||||
|
if (error) {
|
||||||
|
logger.warn(`Failed to start IRC server`, error);
|
||||||
|
} else {
|
||||||
|
logger.warn(`IRC server terminated unexpectedly`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void updateWorldStateCollections();
|
void updateWorldStateCollections();
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
void updateWorldStateCollections();
|
void updateWorldStateCollections();
|
||||||
|
|||||||
@ -15,6 +15,7 @@ export interface IConfig {
|
|||||||
bindAddress?: string;
|
bindAddress?: string;
|
||||||
httpPort?: number;
|
httpPort?: number;
|
||||||
httpsPort?: number;
|
httpsPort?: number;
|
||||||
|
ircExecutable?: string;
|
||||||
ircAddress?: string;
|
ircAddress?: string;
|
||||||
hubAddress?: string;
|
hubAddress?: string;
|
||||||
nrsAddress?: string;
|
nrsAddress?: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user