Created
April 12, 2016 17:19
-
-
Save boxdot/4b0686515574571e054dd8f4e41c3835 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# openssl req -nodes -x509 -new -keyout server.key -out server.crt | |
# brew install openssl | |
# pip install pyOpenSSL | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return 'Flask is running!' | |
if __name__ == "__main__": | |
context = ('server.crt', 'server.key') | |
app.run( | |
host='0.0.0.0', | |
port=8080, | |
ssl_context=context, | |
threaded=True, | |
debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment