Answer the question
In order to leave comments, you need to log in
Why is the react-express-heroku application deployed this way?
Hello everyone!)
There is an application https://github.com/LaptopTheOne/react-express-hero... where the front is implemented on react.js, and the API server is on express.js. Deployed on heroku.
Appeared with deployment. The file package.json
https://github.com/LaptopTheOne/react-express-hero... contains the following scripts:
"scripts": {
"start": "node ./bin/www",
"heroku-postbuild": "cd client/ && npm install && npm install --only=dev --no-shrinkwrap && npm run build",
"client": "cd client && npm start",
"dev": "concurrently --kill-others-on-fail \"npm run start\" \"npm run client\""
}
"start": "node ./bin/www",
"heroku-postbuild": "cd client/ && npm install && npm install --only=dev --no-shrinkwrap && npm run build"
"start": "node ./bin/www && cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build"
Answer the question
In order to leave comments, you need to log in
Obviously postbuild and start are different stages of the lifecycle. The postbuild step is executed once during deployment, while start can be executed many times during restarts, migrations, scaling, and so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question