I am working on an Angular4 app using the Angular CLI. I have environments files (environments.prod.ts and environments.dev.ts). I want to create two different apps on Heroku that each is using a different environments file, but both are deploying from the same git repo.
My app is delivered by a NodeJS server and running this script in package.json file:
"scripts": {
"heroku-prebuild": "npm install && cd ng-client && npm install && ng build",
"start": "node ./bin/www"
},
my Heroku procfile looks like that:
web:npm start
I know that eventually I need to run ng build --prod instead of ng build.
I was reading about environment variables I can pass to heroku environment. But how do I complete the entire cycle?
Thanks.