2024-05-26 19:05:19 +02:00
|
|
|
use serde::Serialize;
|
2024-06-15 14:26:01 +02:00
|
|
|
use tuono_lib::{Props, Request, Response};
|
2024-05-26 19:05:19 +02:00
|
|
|
|
|
|
|
|
#[derive(Serialize)]
|
|
|
|
|
struct MyResponse<'a> {
|
2024-06-02 21:24:43 +02:00
|
|
|
subtitle: &'a str,
|
2024-05-26 19:05:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tuono_lib::handler]
|
2024-11-11 21:52:22 +01:00
|
|
|
async fn get_server_side_props(_req: Request) -> Response {
|
2024-06-15 14:26:01 +02:00
|
|
|
Response::Props(Props::new(MyResponse {
|
2024-06-02 21:24:43 +02:00
|
|
|
subtitle: "The react / rust fullstack framework",
|
2024-05-26 19:05:19 +02:00
|
|
|
}))
|
|
|
|
|
}
|