Skip to content

Commit 963fda0

Browse files
committed
app: getting port from env variable
1 parent e0c7e19 commit 963fda0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from flask import Flask, request, render_template
23

34
from inspector import ImgLinkInspector
@@ -13,5 +14,5 @@ def root():
1314

1415

1516
if __name__ == '__main__':
16-
# Threaded option to enable multiple instances for multiple user access support
17-
app.run(threaded=True, port=5000)
17+
port = int(os.environ.get("PORT", 5000))
18+
app.run(threaded=True, port=port)

0 commit comments

Comments
 (0)