The tink_web
documentation assumes that the application will always be mounted at the web root. But how to mount an app under a non-root path?
Let’s say that I have 3 different environments where the app is deployed, each one having its own mount point:
-
development
: the app is mounted at the root (e.g. http://my_app.localhost/) -
production
: the app is mounted under the “api” folder (e.g. https://www.domain.com/api/) -
staging
: the app is mounted under the “apps/my_app” folder (e.g. https://stg.domain.com/apps/my_app/)
In development
, everything is OK. But in other environments, the routing fails because of the mount point.
I didn’t see any API that allow me to specify the mount point. How can I dynamically specify it, or make the router strip the mount point from the requests?