diff options
author | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-08-06 15:08:29 -0300 |
---|---|---|
committer | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-08-06 15:08:29 -0300 |
commit | 9b3cb8e5ff9ac571f91a5bca486988992665c5c9 (patch) | |
tree | 1067124dad772024f1baceca96c99c032fa01485 /service/app | |
parent | f285e0b7032c6913f4165407c859eb077292326d (diff) |
Have the service serve the web-ui html, css and js files
Diffstat (limited to 'service/app')
-rw-r--r-- | service/app/pixelated_user_agent.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/service/app/pixelated_user_agent.py b/service/app/pixelated_user_agent.py index bdfcc336..d13a7fdc 100644 --- a/service/app/pixelated_user_agent.py +++ b/service/app/pixelated_user_agent.py @@ -7,7 +7,7 @@ from search import SearchQuery from adapter.mail_service import MailService from adapter.mail_converter import MailConverter -app = Flask(__name__) +app = Flask(__name__, static_url_path='', static_folder='../../web-ui/app') client = None converter = None account = None @@ -108,15 +108,9 @@ def draft_reply_for(mail_id): return respond_json(None) -@app.route('/', defaults={'path': ''}) -@app.route('/<path:path>') -def redirect_to_front(path): - response = requests.get("http://localhost:9000/%s" % path) - return Response( - response=response, - status=response.status_code, - content_type=response.headers['content-type'] - ) +@app.route('/') +def index(): + return app.send_static_file('index.html') if __name__ == '__main__': app.config.from_envvar('PIXELATED_UA_CFG') |