~garritfra/express-rs

A simple express-inspired web framework written in your favorite programming language🦀

#3 Returns 200 eventhough page was not found

~garritfra commented on express-rs todo

a month ago

cb812e9 chore: http: refactor Mount "matches" functions

a month ago

#express-rs

This crate emulates the behavior of the Express.js framework for Rust.

https://crates.io/crates/express-rs

#State of the Project

  • [x] Simple GET/POST/PUT/DELETE requests
  • [x] Body parsing
  • [x] Status codes
  • [x] Header parsing
  • [ ] proper HTML rendering
  • [ ] Dynamic query and route params
  • [ ] Multithreading

#Example

See examples directory for more examples

use express_rs::Express;

fn main() {
    let mut app = Express::new();

    app.get("/", |_, res| res.send("Hello World!".to_string()));

    app.listen(8080);
}

#License

This project is licensed under either of

at your option.