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

16 lines
372 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(
2024-05-23 22:02:50 +02:00
read_to_string("./.tuono/server/dev-server.js").unwrap(),
2024-05-18 20:45:35 +02:00
""
).unwrap()
)
}
}