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); -}