chore: reorg
This commit is contained in:
13
__web/pencil/src/main.rs
Normal file
13
__web/pencil/src/main.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
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");
|
||||
}
|
||||
Reference in New Issue
Block a user