webforge

Crates.iowebforge
lib.rswebforge
version0.1.1
sourcesrc
created_at2023-09-12 08:01:42.93697
updated_at2023-09-12 08:19:39.461472
descriptionA simple http server API for rust.
homepage
repository
max_upload_size
id970496
size4,345
Illia Zhdanov (Gamer069)

documentation

README

WebForge

a simple http server written in rust

Example

#[tokio::main]
async fn main() {
    println!("Starting HTTP server...");
    let mut server: HTTPServer = HTTPServer::new(([127, 0, 0, 1], 8080).into());
    server.insert("/".to_string(), || {
        return (200, "index.html".to_string());
    });
    server.start().await;
}

Also make sure put the .html files in the src/res directory.

Other

quick note: for now this project is WIP.

Commit count: 0

cargo fmt