diff --git a/app.py b/app.py index 1f1654cc0d5fcd4e496b73bc783f380b121258a3..9f33cbf4fa58c043cc59b43a0721d10798030c32 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 ab58b4ebdd8b8760b2bbb45528cdda8c27fba07a..225794e48ff328ab7dd4a49d9037bf56aa3575e0 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)))