Add "start" command

So the app could be easily deployed to Heroku
This commit is contained in:
Kirill Maltsev 2020-12-08 16:23:46 +02:00
parent 32a99433c7
commit 4e60e4f163
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,8 @@
"scripts": {
"build": "webpack --config config/webpack.build.js",
"start:dev": "node scripts/server.js --mode=development",
"start:prod": "npm run build && node scripts/server.js --mode=production",
"start:prod": "npm run build && npm run start",
"start": "node scripts/server.js --mode=production",
"test": "jest",
"pretty-quick": "pretty-quick",
"format": "prettier --write .",

View File

@ -28,5 +28,5 @@ if (server_mode === SERVER_MODES.DEVELOPMENT) {
startBackendServer(3000);
} else {
console.info("Starting server in production mode.");
startBackendServer(8080);
startBackendServer(process.env.PORT || 8080);
}