login with heroku CLI
$ heroku login
Create backend and frontend apps
$ heroku create ekaly-backend
Add and rename Heroku remotes
$ heroku git:remote -a ekaly-backend
$ git remote rename heroku backend
Make sure to have git-subtree installed.
In package.json
of each project
"scripts": {
+ "publishToHeroku": "cd ../ && git subtree push --prefix api backend main || true",
"clean": "rimraf dist logs",
...
},
Run the command
$ heroku config:set KEY=VALUE --remote backend
$ yarn publishToHeroku