1

I'm developing two very similar Express apps that share the same codebase and are checked into one central git repository. There are small differences toggled via environment variables.

How can I deploy the same code two different Heroku sites?

1 Answer 1

2

Use heroku config to set the appropriate environment variables for each app:

heroku config:set FLAVOR=Chocolate -a app1
heroku config:set FLAVOR=Strawberry -a app2

Create git remotes for each app (this is using the same name for the remote as the app name):

heroku git:remote --remote app1 -a app1
heroku git:remote --remote app2 -a app2

Push to each app:

git push app1
git push app2
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.