Card Deck basic API
POST /deck/create
stretched & shuffled deck:
$ curl --location --request POST 'localhost:3333/deck/create' \
--header 'Content-Type: application/json' \
--data-raw '{ "type": "SHORT", "shuffled": true }
'full & unshuffled deck:
$ curl --location --request POST 'localhost:3333/deck/create' \
--header 'Content-Type: application/json' \
--data-raw '{ "type": "FULL", "shuffled": false }
'GET /deck/open
Open deck with deckId 00112233-4455-6677-8899-aabbccddeeff
$ curl --location --request GET 'localhost:3333/deck/open/00112233-4455-6677-8899-aabbccddeeff'PUT /deck/draw
Draw 7 cards from deck with deckId 00112233-4455-6677-8899-aabbccddeeff
$ curl --location --request PUT 'localhost:3333/deck/draw/00112233-4455-6677-8899-aabbccddeeff' \
--header 'Content-Type: application/json' \
--data-raw '{
"count": 7
}'NB! Docker, yarn & npm should be already installed on your machine
$ yarn install$ yarn run db:dev:up
$ yarn run db:dev:migrate
$ yarn run start$ yarn run test$ yarn run test:e2e$ yarn run test:cov$ yarn db:test:rm
$ yarn db:dev:rm