webforge 0.1.1

A simple http server API for rust.
Documentation
  • Coverage
  • 0%
    0 out of 6 items documented0 out of 5 items with examples
  • Size
  • Source code size: 19.94 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.58 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 57s Average build duration of successful builds.
  • all releases: 57s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Gamer069

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.