[Flask] Unable to access backend application with DispatcherMiddleware deployment

Vasudev Kamath vasudev at copyninja.info
Sun May 22 06:18:21 EDT 2016


Hello,

I've an application ¹ which uses "Combining application" deployment as
mentioned in Flask documentation here ².  Application itself is written
as per ³.

I'm actually deploying 2 application one is frontend which is main app
and another backend app for serving API at /api ⁴. API application has
jsonrpc app which is exposed at /api/JSONRPC.

Both frontend and API uses Blueprints to add routing rules. API part
uses a custom decorator to register route for blueprint ⁵ ⁶.

After creating app for api part I can see /api/JSONRPC registered in the
`url_map` but when I hit /api/JSONRPC I get 404 error. I'm unable to
figure out why this is happening. 

Can any one help me figure out what is causing 404 errors?. I did try
Google and also posted on Stack Overflow⁷ but didn't get any solution
yet.


¹ https://github.com/libindic/Silpa-Flask/tree/development
² http://flask.pocoo.org/docs/0.10/patterns/appdispatch/#combining-applications
³ http://mattupstate.com/blog/how-i-structure-my-flask-applications/https://github.com/libindic/Silpa-Flask/blob/development/wsgi.pyhttps://github.com/libindic/Silpa-Flask/blob/development/silpa/api/__init__.py#L6https://github.com/libindic/Silpa-Flask/blob/development/silpa/api/jsonrpc.py#L27http://stackoverflow.com/questions/37241098/combining-2-flask-apps-using-dispatchermiddleware-instance-results-in-404-for-se

Thanks and Regards,

--
Vasudev


More information about the Flask mailing list