This crate emulates the behavior of the Express.js framework for Rust.
https://crates.io/crates/express-rs
- Simple GET/POST/PUT/DELETE requests
- Body parsing
- Status codes
- Header parsing
- proper HTML rendering
- Dynamic query and route params
- Multithreading
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);
}
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.