Thank you for your link it has helped me a lot. However I think I must be missing something
When just using mono application then book_api_v1_0 was working fine
I have tried to adapt it to use DispatcherMiddleware
in /home/rdent/mysite I have book_api_v1_0.py & book_front.py
From postman https://rdent.pythonanywhere.com/api/v1_0/book
I get error
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try
again.</p>
Here is the modified WSGI config file, could you give me a pointer as to what is wrong:
import sys
from werkzeug.middleware.dispatcher import DispatcherMiddleware
Add your project directories to sys.path
project_home = '/home/rdent/mysite'
if project_home not in sys.path:
sys.path = [project_home] + sys.path
print("sys.path:", sys.path)
from book_api_v1_0 import app as book_api_v1_0_app
from book_front import app as book_front_app
Create a DispatcherMiddleware to route requests based on path
application = DispatcherMiddleware(book_front_app, {
'/api/v1_0/book': book_api_v1_0_app,
enter code here
})