diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-01-19 16:20:45 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-01-19 16:20:45 +0100 |
commit | 6d70c89a2b45d86cd12a99467d6e1eb4c6328ed7 (patch) | |
tree | df8db3fdefdb225db999d02c27c190050ba8f34b /kaasnoot-server/src |
server initial commit
Diffstat (limited to 'kaasnoot-server/src')
-rw-r--r-- | kaasnoot-server/src/main.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kaasnoot-server/src/main.rs b/kaasnoot-server/src/main.rs new file mode 100644 index 0000000..40eb9c8 --- /dev/null +++ b/kaasnoot-server/src/main.rs @@ -0,0 +1,13 @@ +use tokio; +use warp::Filter; + +#[tokio::main] +async fn main() { + let hello = warp::path!("hello" / String) + .and_then(|name| format!("Hello, {}!", name)) + .or(|rip| _); + + warp::serve(hello) + .run(([127, 0, 0, 1], 3030)) + .await; +} |