@@ -13,4 +13,5 @@ fn hello(_: Request, res: Response) {
|
||||
|
||||
fn main() {
|
||||
hyper::Server::http(Ipv4Addr(127, 0, 0, 1), 3000).listen(hello).unwrap();
|
||||
println!("Listening on http://127.0.0.1:3000");
|
||||
}
|
||||
|
||||
@@ -52,4 +52,5 @@ fn echo(mut req: Request, mut res: Response) {
|
||||
fn main() {
|
||||
let server = Server::http(Ipv4Addr(127, 0, 0, 1), 1337);
|
||||
server.listen(echo).unwrap();
|
||||
println!("Listening on http://127.0.0.1:1337");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user