Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 1017 Bytes

README.md

File metadata and controls

61 lines (47 loc) · 1017 Bytes

Management Circle App for University

Tech Stack

  • Rust
  • axum
  • tokio
  • Docker

Design Pattern

  • Domain Driven Design

How to run

  1. First, start the database container. Refer to the docs for more details.
  2. Next, run the devcontainer.
  3. Finally, start the server with the following command:
cargo run

Alternatively, you can start the server in watch mode with:

./watch.sh

create

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
        "circle_name": "music club",
        "capacity": 10,
        "owner_name": "John Lennon",
        "owner_age": 21,
        "owner_grade": 3,
        "owner_major": "Music"
      }' \
  http://127.0.0.1:3000/circle

find

curl -X GET http://127.0.0.1:3000/circle/{circle_id}

update

curl -X PUT \
  -H "Content-Type: application/json" \
  -d '{
        "circle_name": "football club",
        "capacity": 15
      }' \
  http://127.0.0.1:3000/circle/{circle_id}