From 3a56914be7a238d233435b703a4a189d86f2e99b Mon Sep 17 00:00:00 2001 From: "Karel L. Kubat" Date: Wed, 27 Nov 2024 14:38:23 +0000 Subject: [PATCH] chore: remove server dir somehow this got committed and merged (it's from a dirty worktree.) --- server/Cargo.toml | 14 -------------- server/src/main.rs | 36 ------------------------------------ 2 files changed, 50 deletions(-) delete mode 100644 server/Cargo.toml delete mode 100644 server/src/main.rs diff --git a/server/Cargo.toml b/server/Cargo.toml deleted file mode 100644 index 48f2bbe2d9..0000000000 --- a/server/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -edition.workspace = true -license-file.workspace = true -name = "server" -repository.workspace = true -version = "0.1.0" - -[dependencies] -axum = { version = "0.7.0" } -serde = { workspace = true, features = ["derive"] } -tokio = { workspace = true, features = ["full"] } - -[lints] -workspace = true diff --git a/server/src/main.rs b/server/src/main.rs deleted file mode 100644 index 84fce89a26..0000000000 --- a/server/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -use std::collections::HashMap; - -use axum::{ - extract::{Path, Query}, - http::StatusCode, - routing::{get, post}, - Json, Router, -}; -use serde::{Deserialize, Serialize}; - -#[tokio::main] -async fn main() { - // build our application with a route - let app = Router::new() - // `GET /` goes to `root` - .route("/", get(root)) - // `POST /users` goes to `create_user` - .route("/:chain_id", get(print_chain_id)); - - // run our app with hyper, listening globally on port 3000 - let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); - axum::serve(listener, app).await.unwrap(); -} - -// basic handler that responds with a static string -async fn root() -> &'static str { - "Hello, World!" -} - -async fn print_chain_id( - Path(chain_id): Path, - Query(params): Query>, -) { - println!("{}", chain_id); - println!("{:?}", params); -}