Skip to content

Instantly share code, notes, and snippets.

@jackfischer
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackfischer/6aaf6b91520acfabb3b4 to your computer and use it in GitHub Desktop.
Save jackfischer/6aaf6b91520acfabb3b4 to your computer and use it in GitHub Desktop.
flask boilerplate
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