Skip to content

Instantly share code, notes, and snippets.

@mchurichi
Last active February 2, 2023 00:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mchurichi/9978cc672252fd87db6bedc9d4df4633 to your computer and use it in GitHub Desktop.
Save mchurichi/9978cc672252fd87db6bedc9d4df4633 to your computer and use it in GitHub Desktop.
How to run a Flask app locally over https
@app.cli.command()
def secure(length):
context = ('certs/server.crt', 'certs/server.key')
app.run(host='0.0.0.0', port=443, debug=True, ssl_context=context)
#$ export FLASK_APP=wsgi.py flask secure
@mchurichi
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment