From 9fbdc399e707c4c3032395ec6ca2b1ae15b015f2 Mon Sep 17 00:00:00 2001 From: Dave Whiteland <davewhiteland@users.noreply.github.com> Date: Mon, 24 Mar 2025 13:41:41 +0000 Subject: [PATCH] add BUGGY_EDITOR_PORT for clearer control over port number --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 8ff30f5..420bf92 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,5 @@ from flask import Flask, jsonify, render_template, request, send_file +import os import sqlite3 as sql # the flask application: uses the webserver imported from the flask module: @@ -99,4 +100,6 @@ def send_favicon(): # with control-C), it will run forever... so any code you put _after_ app.run # here won't normally be run. if __name__ == "__main__": - app.run(debug=True, host="0.0.0.0", port=5000) + allocated_port = os.environ.get('BUGGY_EDITOR_PORT') or 5000 + app.run(debug=True, host="0.0.0.0", port=allocated_port) + -- GitLab