Within one git repo, I have two separate applications (web server and API server).
How can I deploy each application to its own Heroku app?
(So there
We can add to the customized script to deploy a particular folder in our git directory to our npm scripts in the package.json file. Check the below code in the package.json file
"scripts": {
"start": "node app.js",
"publishheroku": "cd ../../ && git subtree push --prefix nodeapps/appone heroku-app-one master || true"
},
then you can run npm run-script publishheroku
to deploy.
Also, go through this link for detailed explanation.