mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-30 22:32:47 -07:00
feat: create route handler macro
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user