currently I have a simple API running with Flask under a subdirectory of some internal IIS site. Now I thought it might be some idea to rewrite that API using FastAPI instead. Running the API on IIS isn't a hard thing, you have to create a web.config
and so some stuff inside the IIS configuration. I know that this is using WSGI, but is there a possibility to use ASGI as well (maybe in combination with uvicorn and gunicorn)?
One thing which is important is that it must run under a certain subdirectory, call it <iis_internal_company_server>/myapi
. In Flask I have included a well-known prefix middleware which works as expected. I was looking for something similar for FastAPI, is this may a case to use app.include_router(router, prefix='/myapi')
?
Have done some research but did not find a solution. Maybe one of you may have some experience with it. If so, please share. Many thanks in advance.
Regards, Thomas