mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-06-16 05:24:17 -06:00
17 lines
416 B
Rust
17 lines
416 B
Rust
use actix_web::{web, App, HttpServer};
|
|
|
|
use actix_web_learning::{hello, echo, resend, manual_hello};
|
|
|
|
#[actix_web::main]
|
|
async fn main() -> std::io::Result<()> {
|
|
HttpServer::new(|| {
|
|
App::new()
|
|
.service(hello)
|
|
.service(echo)
|
|
.service(resend)
|
|
.route("/hey", web::get().to(manual_hello))
|
|
})
|
|
.bind(("darkicen950.local", 8080))?
|
|
.run()
|
|
.await
|
|
} |