Skip to content

How to Keep Your Code Private and Deploy Your Prototype for Free on Heroku

Kaelig Deloumeau-Prigent edited this page Oct 14, 2016 · 2 revisions

If you're working on some rather private or forward looking prototypes, we recommend keeping your code away from the public eye.

Pre-requisites

  1. Git
  2. A Heroku account (free)
  3. Heroku CLI (Command Line Interface)

1. Clone the Design System Starter Kit

In a terminal window, run:

git clone https://github.com/salesforce-ux/design-system-starter-kit.git

2. Create the app and deploy for the first time

  1. Go to https://dashboard.heroku.com/apps
  2. Click New › Create new app
  3. Choose an app name (e.g. "your-app" will create your-app.herokuapp.com)
  4. Click Create App
  5. Follow instructions in the "Deploy using Heroku Git" section of the page

You should execute something like this:

cd design-system-starter-kit
heroku git:remote -a your-app
git push heroku master

3. Protect your work with a username and password

  1. Go to your Heroku app dashboard
  2. Click Settings
  3. Click Reveal Config Vars
  4. Create 2 config vars: USERNAME and PASSWORD with the values of your preference.

Next time you load your app, you'll be greeted with an authentication prompt.

4. Deploying your changes to Heroku

Deploy your changes to Heroku using git:

git add .
git commit -m "Your message"
git push heroku master

4. Preview your changes

Go to https://your-app.herokuapp.com, et voilà!