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

Merge branch 'master' into 'main'

changed it again

See merge request !12
parents f4dbde39 7bff2f0b
No related branches found
No related tags found
1 merge request!12changed it again
......@@ -13,6 +13,7 @@ class Project(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
description = db.Column(db.Text, nullable=False)
@app.route('/')
def home():
try:
......@@ -84,3 +85,5 @@ def download_assessment(filename):
app.logger.exception(f"Error serving assessment file: {str(e)}")
abort(500)
if __name__ == '__main__':
app.run(debug=True, port=int(os.environ.get('PORT', 8080)))
import os
import sys
import logging
from app import app as application
from markupsafe import Markup
......@@ -8,9 +6,5 @@ sys.modules['flask'].Markup = Markup
logging.basicConfig(stream=sys.stderr)
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)
if __name__ == '__main__':
application.run(host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
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