Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Support CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajunsu committed Feb 1, 2019
1 parent b6fe83a commit f93dab2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion calculator_of_Onmyoji/cm_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import webbrowser

import flask
from flask_cors import CORS
from webob import exc

from calculator_of_Onmyoji import cal_mitama
Expand All @@ -25,6 +26,7 @@
else:
app = flask.Flask(__name__)

CORS(app)
work_path = os.path.dirname(os.path.realpath(__file__))


Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ xlwt
requests
tqdm
flask
flask-cors
webob

0 comments on commit f93dab2

Please sign in to comment.