From 52d6cbdce836277936e41b4feccc0e2147fe8073 Mon Sep 17 00:00:00 2001
From: Felix Chadwick-Smith <chadwick-smithff@cardiff.ac.uk>
Date: Wed, 10 Jan 2024 16:32:50 +0000
Subject: [PATCH] specified it to run 8080 on wsgi.py file

---
 app.py  | 2 ++
 wsgi.py | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/app.py b/app.py
index 1f1654c..9f33cbf 100644
--- a/app.py
+++ b/app.py
@@ -86,3 +86,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', 5000)))
\ No newline at end of file
diff --git a/wsgi.py b/wsgi.py
index ab58b4e..225794e 100644
--- a/wsgi.py
+++ b/wsgi.py
@@ -8,4 +8,4 @@ sys.modules['flask'].Markup = Markup
 logging.basicConfig(stream=sys.stderr)
 
 if __name__ == '__main__':
-    application.run(host='0.0.0.0', port=8080)
+    application.run(host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
-- 
GitLab