Skip to content

Commit

Permalink
simplier example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Apr 10, 2018
1 parent fd87eb5 commit 5e6a0aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Actix web is a simple, pragmatic and extremely fast web framework for Rust.

```rust
extern crate actix_web;
use actix_web::{server, App, Path};
use actix_web::{http, server, App, Path};

fn index(info: Path<(u32, String)>) -> String {
format!("Hello {}! id:{}", info.0, info.1)
Expand All @@ -42,7 +42,7 @@ fn index(info: Path<(u32, String)>) -> String {
fn main() {
server::new(
|| App::new()
.resource("/{id}/{name}/index.html", |r| r.with(index)))
.route("/{id}/{name}/index.html", http::Method::GET, index))
.bind("127.0.0.1:8080").unwrap()
.run();
}
Expand Down

0 comments on commit 5e6a0aa

Please sign in to comment.