mirror of
https://github.com/actix/actix-website
synced 2025-02-02 04:09:06 +01:00
removes outdatej code in examples.
This commit is contained in:
parent
4c398feed7
commit
a5f7e0d095
@ -1,20 +1,3 @@
|
||||
// // <setup>
|
||||
// extern crate actix_web;
|
||||
// use actix_web::{server, App, HttpRequest};
|
||||
|
||||
// fn index(_req: &HttpRequest) -> &'static str {
|
||||
// "Hello world!"
|
||||
// }
|
||||
// // </setup>
|
||||
// // <main>
|
||||
// fn main() {
|
||||
// server::new(|| App::new().resource("/", |r| r.f(index)))
|
||||
// .bind("127.0.0.1:8088")
|
||||
// .unwrap()
|
||||
// .run();
|
||||
// }
|
||||
// // </main>
|
||||
|
||||
// <setup>
|
||||
extern crate actix_web;
|
||||
use actix_web::{web, App, HttpRequest, HttpResponse, HttpServer};
|
||||
@ -23,6 +6,7 @@ fn index(_req: HttpRequest) -> HttpResponse {
|
||||
HttpResponse::Ok().body("Hello world!")
|
||||
}
|
||||
// </setup>
|
||||
|
||||
// <main>
|
||||
fn main() {
|
||||
HttpServer::new(|| App::new().service(web::resource("/").to(index)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user