Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.49 KB

heroku_setup.md

File metadata and controls

50 lines (33 loc) · 1.49 KB

Heroku Setup

create an .md file for how to setup heroku and reference it here.

Given you have the Heroku Toolbelt installed, follow the steps below to get the app up and running. For more info on using Python with Heroku, check out the official Heroku documenation.

Create a Procfile and add the following code:

$ echo "web: gunicorn run:app" >> Procfile

Basically, you name one process/service per line that you want to run on Heroku in the Procfile; currently we just want to run our app.

Make sure install gunicorn and add it to requirements.txt:

$ pip install gunicorn==19.3.0
$ pip freeze > requirements.txt

Lets create our app on Heroku and initialize it:

$ heroku create

Then commit and push your code up to Heroku:

$ git add -A
$ git commit -m "first commit"
$ git push heroku master

Checkout your app in action!

$ heroku open

Next, we'll work on creating our Instagram analyzer within instagram_analyze.py. to access the Instagram API to pull relevant data. We will only use a Client ID (which will be created later) for this, so we are limited to 5,000 requests per hour.

Create an env.sh file inside our root directory to house the Client ID:

$ touch env.sh

Add this file to your .gitignore file since it will contain sensitive info.