docsite
docsite copied to clipboard
Using ServerFn in dioxus_desktop
I've tried the dioxus_fullstack example. As far as I understood it has an underlying axum server, which serves both the static files and the generated APIs made by ServerFn.
Is it possible to separate them for use in dioxus_desktop?
I imagine something like:
- dioxus_desktop runs a compiled binary (spawns a webview anyway)
- dioxus (ssr) runs server-side axum, serving only the APIs without the web static files
- they talk over the network
I tried to search in the documentation and examples by I haven't found anything so far
Yes! You can have an Axum server with a desktop/tui/native/mobile application with server functions. There is an example here.
It would be great to add a small section in the docs explaining how to use dioxus-fullstack with desktop
Thanks
I can try to add the section to the docs, after I get a bit more acquainted