From 50e1104d6125841441940ac66c5e92aefa40abdd Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Mon, 28 Apr 2014 16:29:07 +0530 Subject: [PATCH] Use werkzeug DispatcherMiddleware for apps We have 2 apps now within same application, one is for api and second one is for frontend, we will use DispatcherMiddleware to register both these apps into single WSGI frontend. Signed-off-by: Vasudev Kamath --- wsgi.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 wsgi.py diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..5e47d59 --- /dev/null +++ b/wsgi.py @@ -0,0 +1,7 @@ +from werkzeug.serving import run_simple +from werkzeug.wsgi import DispatcherMiddleware + +from silpa import api, frontend + +application = DispatcherMiddleware(frontend.create_app(), + {'/api': api.create_app()})