/vu-hē-oʊ/
An experimental fast and pertinent web platform for modern devices.
Rust backend and TypeScript frontend.
See https://github.com/vujio/vujio
Example:
``` use vujio::*;
async fn main() {
#[gethtml("/")]
async fn main(req: Request Directory:{}
format!(
"Pages:<br>{}", directory_list
)
}
#[get_html]
async fn test_path(_req: Request<AppState>) -> String {
"Page: /test_path".into()
}
#[message("/websocket")]
async fn message(stream: &WebSocketConnection, input: String) {
println!("Client says: {:?}", input);
stream.send_string("server response".into()).await;
}
#[binary_stream("/ws")]
async fn my_stream(stream: &WebSocketConnection, input: Vec<u8>) {
stream.send_bytes(input).await;
}
} ```