diff --git a/calculator_of_Onmyoji/cm_server.py b/calculator_of_Onmyoji/cm_server.py index b2fcec2..2b71d3c 100644 --- a/calculator_of_Onmyoji/cm_server.py +++ b/calculator_of_Onmyoji/cm_server.py @@ -11,6 +11,7 @@ import webbrowser import flask +from flask_cors import CORS from webob import exc from calculator_of_Onmyoji import cal_mitama @@ -25,6 +26,7 @@ else: app = flask.Flask(__name__) +CORS(app) work_path = os.path.dirname(os.path.realpath(__file__)) @@ -78,4 +80,4 @@ def open_browser(host, port): t = threading.Thread(target=open_browser, args=(host, port)) t.start() - app.run(host=host, port=port) + app.run(host=host, port=port, threaded=True) diff --git a/requirements.txt b/requirements.txt index 6f43c6c..5009c1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,5 @@ xlwt requests tqdm flask +flask-cors webob