Solution for a case exercise involving poker hands
The server runs in a Docker container, managed by Docker Compose. To start the server:
docker compose up --build
The server should then run on your local TCP-port 8080.
/draw
GET
generates a hand of five cards, returns a JSON representation of it and a classification of the hand.
/analyze/:cards
GET
analyzes the provided cards. The:cards
format is a comma-separated list of rank and suit for five cards. Example:/analyze/tr,jr,qr,kr,1r
would return the JSON string "StraightFlush".
If you have Rust on your system, you can generate and open documentation for the server:
cd server
cargo doc --no-deps --open
https://gm4cngmxqlnzazp7xlvarnvjv40sqlkd.lambda-url.eu-north-1.on.aws/draw
https://gm4cngmxqlnzazp7xlvarnvjv40sqlkd.lambda-url.eu-north-1.on.aws/analyze/tr,jr,qr,kr,1r