Skip to content

Instantly share code, notes, and snippets.

@cadrev
Created March 16, 2016 07:59
Show Gist options
  • Save cadrev/b9a55d56accde02ffe4d to your computer and use it in GitHub Desktop.
Save cadrev/b9a55d56accde02ffe4d to your computer and use it in GitHub Desktop.

Installing Flask

sudo apt-get install python-pip
sudo pip install flask

Basic Code

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello World!'

@app.route('/hello')
def hello():
    return 'Routeeee'

if __name__ == '__main__':
    app.run(host='202.90.159.204',port=5000)

Tutorials

http://flask.pocoo.org/docs/0.10/quickstart/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment