Function titanium::web::serve_internals

pub fn serve_internals<State>(app: &mut Server<State>)where
    State: Clone + Send + Sync + 'static,
Expand description

Serves the internal javascript files that are required for the web server to function.

Example

use titanium::web;
 
#[titanium::main]
async fn main() -> web::Result<()> {
    let mut app = web::new_server();
    web::serve_internals(&mut app);
    web::serve_client_code(&mut app, include_str!("./client.js"));
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}