oswilno/crates/oswilno-server/src/main.rs

19 lines
457 B
Rust
Raw Normal View History

2023-07-26 11:16:29 +02:00
use actix_web::{web, App, HttpServer, Responder};
async fn index() -> impl Responder {
"Hello world!"
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.service(web::scope("/app").route("/index.html", web::get().to(index)))
.configure(oswilno_parking_space::mount)
.configure(oswilno_admin::mount)
})
.bind(("0.0.0.0", 8080))?
.run()
.await
}