Last active
August 29, 2015 14:25
-
-
Save jackfischer/6aaf6b91520acfabb3b4 to your computer and use it in GitHub Desktop.
flask boilerplate
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
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/", methods=['GET', 'POST']) | |
def hello(): | |
if request.method == 'GET': | |
request.args["field"] | |
return "Hello World" | |
if request.method == 'POST': | |
raw_field = request.get_json()["field"] | |
field = request.form["field"] | |
return | |
if __name__ == "__main__": | |
app.run(host='0.0.0.0', debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment