Skip to content

Instantly share code, notes, and snippets.

@blaisethomas
Created September 24, 2015 18:37
Show Gist options
  • Select an option

  • Save blaisethomas/46b670609fdb3c18765c to your computer and use it in GitHub Desktop.

Select an option

Save blaisethomas/46b670609fdb3c18765c to your computer and use it in GitHub Desktop.

#Node + Heroku + Review Session by blaisethomas @ GA LA


Deploying is a highly procedural yet simple operation, that is dependent upon the specific app that you are trying to deploy.

###Resources

#####Asides//recaps:

BodyParser a better explanantion

cool scotch.io demo for building a node-express app

Interestingly, highly opinionated, but a little lacking tilcode tutorial


#####More deployment specific:

Here is a little URL trail of resources useful to completing / deploying a Node Express Mongo app

heroku docs on deploying with git

mongolab hosts your mongoDB or modulus

connecting mongoose to dbs

mongo connection

interesting blog post about mongoose

heroku docs on mongoose

heroku addon for mongoose

heroku deploy tutorial

##Let's practice deploying:

  • (clone the project you want to deploy)
  • cd /
  • $ rm -rf .git
  • $ git init
  • $ git add -A
  • $ git commit -m "first commit"
  • $ git remote add origin https://github.com/username/reponame
  • $ git push -u origin master
  • $ heroku -help
  • $ heroku login ?
  • $ heroku info
  • $ heroku create
  • $ git push heroku master
  • $ heroku ps:scale web=1
  • database, use modulus or mongolabs
    • $ heroku addons:create mongolab
    • $ heroku addons:docs mongolab
    • $ heroku addons:open mongolab
    • $ heroku config | grep MONGOLAB_URI
  • $ heroku logs
  • $ heroku open
  • $ heroku local web with Procfile: web: node index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment