gunnhildr/src/main.rs

19 lines
365 B
Rust
Raw Normal View History

2024-12-06 15:41:27 +01:00
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"
}