actions-test/src/main.rs

19 lines
362 B
Rust
Raw Normal View History

2023-08-03 17:57:16 -04:00
use std::net::SocketAddr;
use axum::{Router, routing::get};
async fn index() -> &'static str {
"hi world"
}
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(index));
let addr = SocketAddr::from(([0, 0, 0, 0], 8997));
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
}