1 unstable release
Uses old Rust 2015
0.1.0 | Oct 25, 2017 |
---|
#183 in #request-response
66KB
1.5K
SLoC
Pen (A Sharp Pen fork (A Pen fork))
A microframework for Rust inspired by Flask.
extern crate pen;
use pen::{Pen, Request, Response, PenResult};
fn hello(_: &mut Request) -> PenResult {
Ok(Response::from("Hello World!"))
}
fn main() {
let mut app = Pen::new("/web/hello");
app.get("/", "hello", hello);
app.run("127.0.0.1:5000");
}
Dependencies
~13MB
~263K SLoC