Skip to content

Commit

Permalink
Ref #8 Set starting port
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Kaźmierczyk <kazm@ibm.com>
  • Loading branch information
kkazmierczyk committed Oct 30, 2024
1 parent 37b08eb commit 6ea17a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@

DATE_FORMAT = "%Y-%m-%d %H:%M:%S"

# Web application constants
DEFAULT_REPORTS_DIR = "reports"
DEFAULT_PORT = 5000
4 changes: 2 additions & 2 deletions javacore_analyser_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from flask import Flask, render_template, request, send_from_directory, redirect

import javacore_analyzer
from constants import DEFAULT_REPORTS_DIR
from constants import DEFAULT_REPORTS_DIR, DEFAULT_PORT

app = Flask(__name__)
with app.app_context():
Expand Down Expand Up @@ -72,4 +72,4 @@ def upload_file():


if __name__ == '__main__':
app.run(debug=True)
app.run(debug=True, port=os.getenv("PORT", DEFAULT_PORT))

0 comments on commit 6ea17a1

Please sign in to comment.