mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
Merge pull request #15 from caulagi/listen-localhost
Listen to localhost instead of all network interfaces
This commit is contained in:
commit
42f6e68525
@ -40,7 +40,7 @@ fn main() {
|
||||
))
|
||||
// register simple route, handle all methods
|
||||
.resource("/", |r| r.f(index))
|
||||
}).bind("0.0.0.0:8080")
|
||||
}).bind("127.0.0.1:8080")
|
||||
.unwrap()
|
||||
.start();
|
||||
|
||||
|
@ -38,7 +38,7 @@ fn main() {
|
||||
// start http server
|
||||
server::new(move || {
|
||||
App::new().resource("/", |r| r.method(http::Method::GET).with(index))
|
||||
}).bind("0.0.0.0:8080")
|
||||
}).bind("127.0.0.1:8080")
|
||||
.unwrap()
|
||||
.start();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user