Skip to content

Instantly share code, notes, and snippets.

@ruizander
Created Nov 17, 2015
Embed
What would you like to do?
#[macro_use] extern crate nickel;
use nickel::Nickel;
fn main() {
let mut server = Nickel::new();
server.utilize(router! {
get "**" => |_req, _res| {
"Hello World!"
}
});
server.listen("127.0.0.1:6767");
}
==========================================================
telnet 127.0.0.1 6767
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.1 200 OK
Content-Type: text/html
Transfer-Encoding: chunked
Date: Tue, 17 Nov 2015 21:44:25 GMT
Server: Nickel
C
Hello World!
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment