pencil

Crates.iopencil
lib.rspencil
version0.3.0
sourcesrc
created_at2015-12-13 13:39:06.365421
updated_at2016-10-09 07:26:19.280421
descriptionA micro web framework for Rust.
homepagehttps://github.com/fengsp/pencil
repositoryhttps://github.com/fengsp/pencil
max_upload_size
id3621
size662,243
Shipeng Feng (fengsp)

documentation

http://fengsp.github.io/pencil/

README

#Pencil

Build Status Crates.io Version Crates.io LICENSE

A microframework for Rust inspired by Flask.

extern crate pencil;

use pencil::{Pencil, Request, Response, PencilResult};

fn hello(_: &mut Request) -> PencilResult {
    Ok(Response::from("Hello World!"))
}

fn main() {
    let mut app = Pencil::new("/web/hello");
    app.get("/", "hello", hello);
    app.run("127.0.0.1:5000");
}

One simple guide: https://fengsp.github.io/blog/2016/3/introducing-pencil/

If you feel anything wrong, feedbacks or pull requests are welcome.

Commit count: 210

cargo fmt