A barebones Node.js app using Express 4.
Make sure you have Node.js, Heroku Toolbelt, and MongoDB installed. Also, in order to build images in the patent application, you'll need to follow the instructions for Canvas. You'll also need to set local variables in a file name ".env" in the project root. This is what Heroku loads when you call "heroku local web". The equivalent development and production variables are accessible in the Heroku Dashboard Settings section.
You'll need to download and start MongoDB locally before launching the app. In the project root level file "index.js", it shows the local MongoDB URI that your app should connect to. It should just be using the default port.
$ git clone https://github.com/IdeaJam/blooming-mountain-87473.git IdeaJam # or clone your own fork
$ cd IdeaJam
$ npm install
$ heroku local webYour app should now be running on localhost:5000.
You just deploy to GitHub in the normal way (e.g. "git push origin develop"). Currently, there are two branches, develop and master, that Heroku listens to and automatically deploys to:
Run npm test. To debug use the command in the package.json file (currently mocha 'spec/**/*.js' with full path to mocha)
Test use mongodb at 'localhost:27017/ideaJamSpec'. The tests drop and recreate the database and the start.
Despite the code being in one repo on GitHub, there are two Heroku projects corresponding to the environments. Each environment has their own plugins, etc. One big difference is that the MongoDB host for the development/staging project is mLab, and the production site uses Mongo Atlas. mLab is an official partner of Heroku and Mongo Atlas is not, so you can access the mLab dashboard through Heroku, whereas Mongo Atlas must be accessed indpendently.
The domain and SSL cert were acquired through name.com, images are stored in Amazon's S3, email is done through SendGrid, and everything else is done through Heroku partners that you can access through the dashboard.