Am trying to deploy a new typescript ui to DAML Hub. We seem to be having issues with the routing of our subpages and getting 404 errors from nginx.
The ui runs fine with combination of sandbox and npm start but once deployed to daml hub we get 404s. Most suggestions on google are to tweak the nginx.conf which I don’t believe we can easily do given the hosted architecture.
We tried removing the ‘exact’ keyword from our ‘Routes’ in our typescript and downgrading versions of react-router-dom from 6.0.1 to 5.0.1 with no beneficial effect.
Any additional suggestions would be appreciated. Many thanks!
You are correct that this stems from the nginx congfiguration.
However, on Daml Hub, the nginx server that hosts user websites is not configurable. When deploying an application UI that relies on client-side routing, we therefore recommend using hash-based routing.