feat: create route handler macro

This commit is contained in:
Valerio Ageno
2024-05-18 20:45:35 +02:00
parent 74968b27cc
commit d4c9b25b90
12 changed files with 149 additions and 43 deletions
+15
View File
@@ -0,0 +1,15 @@
use ssr_rs::Ssr;
use std::cell::RefCell;
use std::fs::read_to_string;
pub struct Js;
impl Js {
thread_local! {
pub static SSR: RefCell<Ssr<'static, 'static>> = RefCell::new(
Ssr::from(
read_to_string("./out/server/server-main.js").unwrap(),
""
).unwrap()
)
}
}