- clone / copy the files (server.js, package.json, Procfile) to your computer or project folder
npm install
echo "node_modules" > .gitignore
node server.js <port number>
- where port number is any number (try 9000 for starters)- open your browser to
localhost:<port number>
- When you are ready to turn off the server, hit
CTRL + C
- Myth CSS PostProcessor (http://myth.io)
- serves you files all nice and dandy
- sets us up to push our own servers to heroku! (more to come)
- setup a Heroku account
- install the Heroku toolbelt: https://devcenter.heroku.com/toolbelt-downloads/osx
- run
heroku login
in your terminal - create a random Heroku server with
heroku create
; this will register a remote git endpoint for you (git remote -v
), which should now show Github (origin) and Heroku - run
heroku ps:scale web=1
to spin-up some resources for your app - then finally push your code repo up to Heroku (yes you can push to Github OR Heroku!) via a git push:
git push heroku master
- from here on out, anytime you want to push to the same heroku server, you only need to repeat step 6.