From 9e6d090fd04793d44352bbab45773ffc1f7eb8c9 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 2 Jan 2018 19:57:25 -0800 Subject: [PATCH] update readme example --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37fb263ef..f861e9601 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Actix web is a small, fast, down-to-earth, open source rust web framework. ```rust,ignore +extern crate actix; +extern crate actix_web; use actix_web::*; fn index(req: HttpRequest) -> String { @@ -10,11 +12,14 @@ fn index(req: HttpRequest) -> String { } fn main() { + let sys = actix::System::new("readme"); HttpServer::new( || Application::new() .resource("/{name}", |r| r.f(index))) - .bind("127.0.0.1:8080")? + .bind("127.0.0.1:8080").unwrap() .start(); + + sys.run(); } ```