hello world

This commit is contained in:
Milim 2024-12-06 15:41:27 +01:00
commit 2b527a325c
No known key found for this signature in database
4 changed files with 2599 additions and 0 deletions

18
src/main.rs Normal file
View file

@ -0,0 +1,18 @@
use actix_web::{get, App, HttpServer};
use log::info;
#[actix_web::main]
async fn main() -> Result<(), std::io::Error> {
env_logger::init();
info!("Server starting...");
HttpServer::new(|| App::new().service(hello))
.bind(("127.0.0.1", 6767))?
.run()
.await
}
#[get("/hello")]
async fn hello() -> &'static str {
"hello"
}