I'm trying to deploy a node app, but I'm running into a problem with how my code is structure. The app is git inited at the top level and it looks like:
App (git tracked in remote repo) - .git - server - client - plugin - extras
Since Heroku needs me to push only the server directory directly with the package.json build file, I'm not sure how to setup my directory. I want it such that I can deploy heroku from the 'App/server' folder, but still git pull/push the entire app as I do now:
App (git tracked in remote repo) - .git - server (can run 'git push heroku master' for just this folder) - .git (?) - client - plugin - extras
How I can achieve this the simplest? I read about git-submodules, but that seems messy and I wanted to be sure. Thank you very much from a git nub.
Heroku Button is no longer limited to source code hosted in public GitHub repos. It now works with both public and private GitHub repos. When used with private repos, a template URL parameter must be specified in the button URL and the Heroku user must be linked to a GitHub account that has access to the private repo.
Each process has its own port in dev, but deploying on Heroku uses just one total. Put the working frontend in a subdirectory of root (such as /frontend ). Put the working backend in a subdirectory of root (such as /api -- the blogpost assumes the backend remains in the root directory -- either way is fine).
I think git-subtree should work:
git subtree push --prefix server heroku master
Additional resources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With