-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Someone on the F# discord mentioned that the guide for switching from Saturn to Giraffe did not work for them.
Repro steps:
- Create SAFE app
- Follow the guide (https://safe-stack.github.io/docs/recipes/client-server/saturn-to-giraffe/)
- Run the bundled version of the app:
dotnet run Bundle
cd deploy
Server.exe
Expectation:
Hit localhost:5000
in your browser and see the default todo app.
Actual result:
Hit localhost:5000
in your browser and get a 404 error.
The fact that the application does work in dev mode dotnet run
but fails once bundled - indicates to me that there is an an inconsistency with the way Vite handles incoming requests vs how Kestrel/IIS handles incoming requests.
I think the difference in behaviour is due to Kestrel is not remapping root requests to index.html
by default. In contrast, Vite defaults to serving index.html
for root requests. (and this seems to be non-negotiable! https://vitejs.dev/guide/#index-html-and-project-root)
For me, the workaround posted in Discord - renaming the public
folder to wwwroot
- did not work.
Working on a PR to fix.