proof of concept

This commit is contained in:
Jonas_Jones 2023-12-03 18:23:36 +01:00
parent aea93a5527
commit 6abba646c7
14 changed files with 1099 additions and 69098 deletions

18
src/main.rs Normal file
View file

@ -0,0 +1,18 @@
use warp::Filter;
#[tokio::main(flavor = "current_thread")]
async fn main() {
// GET /hello/warp => 200 OK with body "Hello, warp!"
let hello = warp::path!("hello" / String)
.map(|name| format!("Hello, {}!", name));
let root = warp::path::end()
.map(|| "Hello, World!");
let routes = hello.or(root);
warp::serve(routes)
.run(([127, 0, 0, 1], 3030))
.await;
}