1
0
mirror of https://github.com/actix/actix-website synced 2025-02-09 06:45:37 +01:00

19 lines
338 B
Rust
Raw Normal View History

2018-05-23 23:25:51 +02:00
// <setup>
extern crate actix_web;
use actix_web::{HttpRequest, App, server};
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>