You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because cargo web doesn't support serving the index.html content, some template servers should be provided in order to provide this functionality as well as to demonstrate how to implement it within their own server.
Servers should include:
Warp
Rocket
Actix-web
and anything else someone is willing to contribute.
All servers should:
Optionally(?) host a REST API mounted under /api/.
Possibly have the ability to just always return index.html content if a endpoint doesn't exist (no api, just a file server).
Serve the index.html for anything not under /api/ instead of returning a 404 error.
There is a little more nuance to handling this sort of redirection in warp, take a look at the example here to see how this pattern can support serving requests from /api/ in addition to the static assets without having to enumerate every possible frontend path.
Closing this because Trunk now provides this feature during development. In #1559 we merged the router examples with the main set and ended up removing the server templates.
For production environments, I think it's reasonable to expect users to be able to configure their server framework for SPAs. An ever growing list of server templates sounds like a nightmare to maintain and keep up to date.
Description
Because cargo web doesn't support serving the index.html content, some template servers should be provided in order to provide this functionality as well as to demonstrate how to implement it within their own server.
Servers should include:
and anything else someone is willing to contribute.
All servers should:
/api/
./api/
instead of returning a 404 error.per: #771
The text was updated successfully, but these errors were encountered: