Initial commit.
This commit is contained in:
commit
1bc79510f2
37 changed files with 6757 additions and 0 deletions
18
server/src/lib.rs
Normal file
18
server/src/lib.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
//! This crate contains all shared fullstack server functions.
|
||||
use dioxus::{logger::tracing::debug, prelude::*};
|
||||
|
||||
/// Echo the user input on the server.
|
||||
#[server(Echo)]
|
||||
pub async fn echo(input: String) -> Result<String, ServerFnError> {
|
||||
Ok(input)
|
||||
}
|
||||
|
||||
#[server]
|
||||
pub async fn test_fn() -> Result<(), ServerFnError> {
|
||||
debug!("Here");
|
||||
#[cfg(feature = "server")]
|
||||
{
|
||||
debug!("This is only on the server.");
|
||||
}
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue