Skip to content
Snippets Groups Projects
Commit f4dbde39 authored by Felix Chadwick-Smith's avatar Felix Chadwick-Smith
Browse files

Merge branch 'master' into 'main'

added more to wsgi.py

See merge request !11
parents 84319d8c 7e1320b1
No related branches found
No related tags found
1 merge request!11added more to wsgi.py
import os
import sys
import logging
from app import app as application
from markupsafe import Markup
......@@ -6,5 +8,9 @@ sys.modules['flask'].Markup = Markup
logging.basicConfig(stream=sys.stderr)
if __name__ == '__main__':
application.run(host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
try:
if __name__ == '__main__':
application.run(host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
except Exception as e:
print(f"Exception during startup: {str(e)}")
sys.exit(1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment