[FE] allows to configure port number
This commit is contained in:
parent
ec6e24ba8a
commit
d4c048d5e8
13
frontend.py
13
frontend.py
|
|
@ -130,10 +130,7 @@ def main(args):
|
|||
database.set_image_output_folder(args.image_output_folder)
|
||||
database.connect(args.db)
|
||||
|
||||
if args.debug:
|
||||
app.run(host="0.0.0.0", port="5432")
|
||||
else:
|
||||
app.run(host="0.0.0.0", port="8888")
|
||||
app.run(host="0.0.0.0", port=args.port)
|
||||
|
||||
database.safe_disconnect()
|
||||
|
||||
|
|
@ -158,6 +155,14 @@ if __name__ == "__main__":
|
|||
help="Path to output images",
|
||||
)
|
||||
|
||||
# Add an argument to set the port
|
||||
parser.add_argument(
|
||||
"--port",
|
||||
type=str,
|
||||
default="8888",
|
||||
help="Port to expose the service",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
main(args)
|
||||
|
|
|
|||
Loading…
Reference in New Issue