I've ported the "blurbs" demo app to work on heroku. You can find that branch here.
See it live: http://blurbs.herokuapp.com/blurbs
How-to (starting from your project's root):
- Add a Procfile to your project's root (see below)
- Move
back/packages.json
to the project's root:mv back/packages.json .
- Move
back/node_modules
to the project's root:mv back/node_modules .
- Create a symlink for
back/node_modules
:cd back; ln -s ../node_modules .; cd ..
- Update your
.gitignore
(see above) - Update
back/back-app.js
to launch itself if it detects that it's running on heroku (see below) - Add a config var for the app to know it's on heroku:
heroku config:set HEROKU=Hi
- Make sure you have a MONGODB config var with the URL to the DB you have set up in heroku (or whatever DB you want). Or feel free to change the config var referenced in back-app.js
- Add all the new stuff, including the entire contents of
front/bower_components
to git:git add -u .; git commit
- Deploy!
git push heroku