dioxus-template
dioxus-template copied to clipboard
Server feature for server crate
As discussed in Discord @ealmloff.
This shows how to include server-side specific functionality when using fullstack.
I believe it might be useful to change the name of the crate from server to something else though. It's getting even more confusing when also adding a feature with the same name.
Feel free to drop or squash the linebreaks commit. I found (the lack of) them confusing.
(deleted my previous comment)
My current thinking about a naming convention for mobile + web and fullstack that feels a bit more intuitive for me is the following:
-
apicrate: just theserver_fnfunctions -
frontendcrate- main entrypoint for web / mobile (e.g. for calling
dioxus::fullstack::prelude::server_fn::client::set_server_url) - shared UI
- main entrypoint for web / mobile (e.g. for calling
-
backendcrate- main entrypoint and configuration for the fullstack server-side
- axum customizations
-
web/mobilecrate- calls frontend or backend main, server-feature gated
- builds the actual app out of frontend elements and customisations
All work in progress. WDYT?