Created
September 21, 2016 17:56
-
-
Save hbradio/d96f55e9834a4583b76c295f0ab85ef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A very simple Flask Hello World app for you to get started with... | |
from flask import Flask | |
app = Flask(__name__) | |
current_status = 'uninitialized' | |
@app.route('/') | |
def hello_world(): | |
return 'Hello from Flask!!' | |
@app.route('/status/<string:status>', methods=['POST']) | |
def handlestatus(status): | |
current_status = status | |
print "Got some status: " + status | |
return ('', 200) | |
@app.route('/status', methods=['GET']) | |
def getstatus(): | |
return current_status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment