To create new SSL certificates, run the following from the root directory and provide the necessary information on the command line:
openssl req -x509 -newkey rsa:4096 -nodes -out app/ssl/cert.pem -keyout app/ssl/key.pem -days 365To run the application locally, execute the following from the app directory:
flask --app app.py runTo make the server publicly available, add --host=0.0.0.0 to listen on all public IPs:
flask --app app.py run --host=0.0.0.0You may also optionally specify a port for the application to run on with the --port= argument:
flask --app app.py run --host=0.0.0.0 --port=5050The application can be run over HTTPS without requiring the creation of certificates by leveraging the --cert=adhoc argument:
flask --app app.py run --cert=adhocAlternatively, if you want to run the application with SSL certificates that you have created in the ssl/ directory, use the following:
flask --app app.py run --cert=ssl/cert.pem --key=ssl/key.pem