Obsidian
is a web-application framework in Rust with a vision to make Rust web development fun.
| Version | Master |
| :--------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------: |
| |
|
```rust use obsidian::App;
fn main() { let mut app = App::new(); let addr = ([127, 0, 0, 1], 3000).into();
app.get("/", |_ctx| { "Hello World" });
app.listen(&addr, || { println!("server is listening to {}", &addr); }); } ```
```rust use obsidian::{App, Responder, context::Context};
fn helloworld(ctx: Context) -> impl Responder { "Hello World" }
fn main() { let mut app = App::new(); let addr = ([127, 0, 0, 1], 3000).into();
app.get("/", hello_world);
app.listen(&addr, || { println!("server is listening to {}", &addr); }); } ```
Example are located in example/main.rs
.
cargo run --example example
NOT READY FOR PRODUCTION!