miniqr/src/main.rs

18 lines
445 B
Rust
Raw Normal View History

2023-10-09 16:40:00 +02:00
use warp::Filter;
#[tokio::main]
async fn main() {
// Match any request and return hello world!
let routes =
warp::path::end()
.map(|| "Hello, World!")
.or(
warp::path!(String)
.and(
warp::get()
)
.map(|x| format!("u get {x}"))
);
warp::serve(routes).run(([127, 0, 0, 1], 3030)).await;
}