rusty-hub/src/main.rs

14 lines
277 B
Rust
Raw Normal View History

2018-06-06 03:32:40 +02:00
extern crate actix_web;
use actix_web::{server, App, HttpRequest};
fn index(_req: HttpRequest) -> &'static str {
"Hello world!"
}
2018-06-05 02:22:33 +02:00
fn main() {
2018-06-06 03:32:40 +02:00
server::new(|| App::new().resource("/", |r| r.f(index)))
.bind("127.0.0.1:8088")
.unwrap()
.run();
2018-06-05 02:22:33 +02:00
}