Created
November 17, 2015 21:45
-
-
Save ruizander/63173d166b16d95093c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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