Added a page to create a Minecraft server; added config module

This commit is contained in:
2022-10-05 00:12:50 -04:00
parent 13e730df7b
commit 8e80151331
7 changed files with 97 additions and 4 deletions

View File

@ -8,7 +8,9 @@ class Server {
// read version file
var versionFilePath = this.rootDir + '/current_version.txt';
this.version = fs.readFileSync(versionFilePath, {encoding:'utf8', flag:'r'});
if (fs.existsSync(versionFilePath)) {
this.version = fs.readFileSync(versionFilePath, {encoding:'utf8', flag:'r'});
}
// set server state
if (fs.existsSync(this.pidFilePath)) {