light_pencil

Crates.iolight_pencil
lib.rslight_pencil
version0.4.4
sourcesrc
created_at2017-10-20 21:51:32.651079
updated_at2017-11-08 11:21:45.537366
descriptionA micro web framework for Rust. (A very light fork of a Pencil fork)
homepagehttps://github.com/luciusmagnn/light_pencil
repositoryhttps://github.com/luciusmagn/light_pencil
max_upload_size
id36409
size67,844
Lukáš Hozda [magnusi] (luciusmagn)

documentation

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

README

light_pencil (A Sharp Pencil fork (A Pencil fork))

Build Status Crates.io Version Crates.io LICENSE

A microframework for Rust inspired by Flask.

extern crate light_pencil;
use light_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/ Documentation: https://fengsp.github.io/pencil/pencil/

Commit count: 242

cargo fmt