summaryrefslogtreecommitdiff
path: root/kaasnoot-server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kaasnoot-server/src/main.rs')
-rw-r--r--kaasnoot-server/src/main.rs13
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;
+}