Skip to content

Instantly share code, notes, and snippets.

@ruizander
Created November 17, 2015 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruizander/63173d166b16d95093c5 to your computer and use it in GitHub Desktop.
Save ruizander/63173d166b16d95093c5 to your computer and use it in GitHub Desktop.
#[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