Commit 43dff5a2 authored by Zixian Cai's avatar Zixian Cai

Fix settings

parent ec95eec0
...@@ -29,5 +29,9 @@ WEB_POI_REPO = "mu-impl-fast" ...@@ -29,5 +29,9 @@ WEB_POI_REPO = "mu-impl-fast"
WEB_POI_HOST = "angus" WEB_POI_HOST = "angus"
WEB_RESULT_DIR = "../results" WEB_RESULT_DIR = "../results"
WEB_SECRET = os.urandom(24) WEB_SECRET = os.urandom(24)
WEB_APPLICATION_ROOT = ""
WEB_HOST = "localhost"
WEB_PORT = 5000
WEB_DEBUG = False
ENVIRON = {} ENVIRON = {}
...@@ -23,6 +23,7 @@ import json ...@@ -23,6 +23,7 @@ import json
app = Flask(__name__) app = Flask(__name__)
app.config['SECRET_KEY'] = settings.WEB_SECRET app.config['SECRET_KEY'] = settings.WEB_SECRET
app.config['APPLICATION_ROOT'] = settings.WEB_APPLICATION_ROOT
@app.route("/visualize_file", methods=["POST"]) @app.route("/visualize_file", methods=["POST"])
...@@ -56,8 +57,8 @@ def index(): ...@@ -56,8 +57,8 @@ def index():
@click.command() @click.command()
@click.option("--host", default="localhost") @click.option("--host", default=settings.WEB_HOST)
@click.option("--port", default=5000, type=int) @click.option("--port", default=settings.WEB_PORT, type=int)
@click.option("--debug", default=False, is_flag=True) @click.option("--debug", default=settings.WEB_DEBUG, is_flag=True)
def web(host, port, debug): def web(host, port, debug):
app.run(host=host, port=port, debug=debug) app.run(host=host, port=port, debug=debug)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment