Syncing Heroku and GitHub repos

First add them:

git remote add origin 
git remote add herkou

In case if you want to clone and add

git clone
git remote add origin

Push and Pull in Github

git remote -v
git pull origin master -- pull from Github Master branch
git push origin master -- push to Github Master branch

Pushing to Heroku

git remote add origin 
git remote add herkou
git push heroku master -- push to Heroku

Installing Flask and hosting a simple Flask app in Heroku PART 1

Install pip or easy_install to install python packages on ubuntu

sudo apt-get install python-pip

FOR easy_install

sudo apt-get install python-setuptools

Install virtualenv

sudo easy_install virtualenv
pip install virtualenv

After installing virtaulenv isuue this command

virtualenv flask

you will get a folder named flask change directory to this folder

cd flask

It contains a complete Python environment ready to be used for this project
Virtual environments can be activated and deactivated, if desired. An activated environment adds the location of its bin folder to the system path, so that for example, when you type python you get the environment’s version and not the system’s one.

Now install flask

flask/bin/pip install flask

Create a Heroku account and Install the Heroku tool belt


and inserting the basic “Hello World” code

import os
from flask import Flask

app = Flask(__name__)

def hello():
    return 'Hello World!'

Test your Flask install by running this webserver:


You should see this in your terminal:
* Running on

Screenshot from 2015-08-07 20:47:11

Now, navigate to localhost:5000 in your browser and make sure you can see “hello world” printed out in the browser window.