Skip to content

Instantly share code, notes, and snippets.

@akleemans
Last active January 15, 2020 12:31
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 akleemans/1dbead8fcf12238ae5787cdf84c333c6 to your computer and use it in GitHub Desktop.
Save akleemans/1dbead8fcf12238ae5787cdf84c333c6 to your computer and use it in GitHub Desktop.
Simple flask web server
# install flask
sudo pip3 install flask
# run script
python3 server.py
from flask import Flask
app = Flask(__name__)
@app.route('/test', methods=['GET'])
def get_test_data():
return 'Request worked.'
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment