Add a basic check for bundled application when starting the server

Note that this will not detect if the client application was built with an old version of the repo.
This commit is contained in:
Jérémie Astori 2017-01-07 19:05:42 -05:00
parent c7e80006b9
commit bc8b699437

View File

@ -18,6 +18,11 @@ var authFunction = localAuth;
module.exports = function() {
manager = new ClientManager();
if (!fs.existsSync("client/js/bundle.js")) {
log.error(`The client application was not built. Run ${colors.bold("NODE_ENV=production npm run build")} to resolve this.`);
process.exit();
}
var app = express()
.use(allRequests)
.use(index)