Merge pull request #25 from tgpethan/reqhandler-check

Make sure reqhandler is not null / undefined
This commit is contained in:
Ethan Stubbs 2020-06-15 13:36:05 +01:00 committed by GitHub
commit d3813d5932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -104,6 +104,10 @@ fs.readFile('./misc/ascii.txt', function(err, data) {
} else {
// All required modules are found, start the framework's server.
global.modules.consoleHelper.printInfo(emoji.wave, "Starting Revolution...");
if (reqhandler == null) {
global.modules.consoleHelper.printError(emoji.cross, "No request handler was loaded, possibly due to an error.");
process.exit(1);
}
frameworkServer();
}
});