I have a Heroku app ready and working, it is connected to my github repo, and I have a Procfile
on my Node.js (NestJS to be precise) server project.
At the moment what happens is every time I make a push to my repo project the heroku deploys the server with:
web npm run start:prod
My goal as part of the CI/CD proccess is to create 2 servers that are deployed:
- When a push to
development
branch is made - and in that case run a development server version - When a push to
master
branch is made and in that case deploy the production server (2 different servers).
My question is what is the way to achieve this?
I guess I should create another Heroku app and connect it to the development branch of my repo, but how do I make sure that here I run a development version? Should i hold 2 different Procfile
s on those branches? Do i actually have to create another Heroku app or is there a better approach to this?