Your app is live. Great! But right now, it runs on your local machine only. If you want others to see and use it, you'll need to deploy it. The quickest way to deploy your app is to push it to Heroku using Git.
- First, make sure you're in the global-growth directory. (
cd global-growth
if necessary.) Now rungit init
to create an empty Git repository. - Heroku will look for a text file called Procfile to tell it how to deploy the app. Create one with the command
echo "web: lein ring server-headless $PORT" > Procfile
. - Heroku will receive only the files you have committed to your local repo, so it's time to add your files to Git and commit these changes to the repo you've just created.
Run
git status
. This command shows you the files you've modified but have yet to stage for a commit. Run the following commands to stage all your files and commit the corresponding changes:git add .
git commit -m "[Your commit message here]"
Your commit message should refer to the changes you've made. Something like "Add functions to retrieve indicator data" would work.
-
As you did in the setup steps, run
heroku create
. You'll see something like this: -
Push your changes to Heroku by running
git push heroku master
. This command takes all the changes you've committed locally and pushes them to Heroku. -
Run
heroku open
. Your application should open in your browser. If that doesn't happen, open a browser and visit the URL whichheroku create
returned. Profit!