Make sure reqhandler is not null / undefined #25

Merged
tgpholly merged 1 commit from reqhandler-check into master 2020-06-15 13:36:06 +01:00
Showing only changes of commit 208d124622 - Show all commits

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();
}
});