We recommend using Heroku to get your prototype online. It's simple and fast to deploy new versions as you work.
In the folder of your prototype, run:
heroku apps:create [name]
[name] will be the address of your prototype online. For example if you run:
heroku apps:create my-prototype
Your prototype would then be available online at http://my-prototype.herokuapp.com.
However, the kit won't show your prototype online without setting a username and password:
You can do this in the on the Heroku website (under Settings ▶ Config Variables) or by running the following commands:
heroku config:set USERNAME=username_here
heroku config:set PASSWORD=password_here
If you don't want to have password protection on your prototype, you can set the USE_AUTH
config var:
heroku config:set USE_AUTH=false
If you have more than one remote you'll need to add a flag to specify which remote to set.
heroku config:set PASSWORD=password_here -r remotename_here
If you make a change to your prototype, commit your changes as usual then run:
git push heroku master
to push your changes to Heroku
We have found its helpful to have at least two different versions of a prototype online.
- dev - an experimental version, where things change rapidly and may well be broken
- master - a stable version, where other people can rely on seeing a working version of the prototype that you're happy with
If you've followed the instructions above, you already have a master version online.
Create a dev branch:
git checkout -b dev
Add a dev heroku remote:
heroku apps:create --remote dev [dev-name]
Push to the dev remote:
git push dev dev:master
Now your dev branch will be live at [dev-name].herokuapp.com
Note that you have to add 'dev:master' this time - if you dont add this, Heroku assumes you want the master branch to be deployed.
Your app will now prompt you for a password when accessed on Heroku (but not when running locally).