How to change the base path? #2964
https://docs.litestar.dev/2/reference/app.html#litestar.app.Litestar How can I change the base path from |
Answered by
provinzkraut
Jan 8, 2024
Replies: 2 comments 1 reply
|
Just add your route handlers to a api_router = Router(path="/api", route_handlers=...)
app = Litestar(route_handlers=[api_router]) |
1 reply
Answer selected by
danielniccoli
|
The litestar app object accepts |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just add your route handlers to a
Routerinstead of toLitestardirectly. Then you can change the base path there for everything except the/schema: