Files
tuono/crates/tuono_lib/src/ssr.rs
T

16 lines
370 B
Rust
Raw Normal View History

2024-05-18 20:45:35 +02:00
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()
)
}
}