If you want to go the google route and have a mono repo for all your Node.js apps, but want to deploy to heroku, it will not work as the Node.js buildpack expects package.json to live in the root folder. Enter the multi node buildpack! It allows you to run a specific app in a repository of multiple apps!
It:
- Looks at
APP_SUBFOLDER
in your env. - Copies
root/${APP_SUBFOLDER}/Procfile
toroot/Procfile
- Copies
root/${APP_SUBFOLDER}/package.json
toroot/package.json
- If present, copies
root/${APP_SUBFOLDER}/yarn.lock
toroot/yarn.lock
And that's it! Super simple!