Crates.io | pen |
lib.rs | pen |
version | 0.1.0 |
source | src |
created_at | 2017-10-25 15:34:34.488733 |
updated_at | 2017-10-25 15:34:34.488733 |
description | A micro web framework for Rust. (A different fork of a very light fork of a Pencil fork) |
homepage | https://github.com/luciusmagnn/pen |
repository | https://github.com/luciusmagn/pen |
max_upload_size | |
id | 36869 |
size | 67,326 |
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");
}