dmigo / books

A simple application to demo docker-compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Books

Examples of requests

  1. Check if the service is up and running

    curl --location --request GET 'http://localhost:8080/health'
  2. Add a book

    curl --location --request POST 'http://localhost:8080/books' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "title": "The Catcher in the Rye",
    "author": "Jerome David Salinger",
    "publish_year": 1951 
    }'
  3. Get all books

    curl --location --request GET 'http://localhost:8080/books'
  4. Get one book (Don't forget to replace {BOOK_ID} with a real id of a book)

    curl --location --request GET 'http://localhost:8080/books/{BOOK_ID}'

About

A simple application to demo docker-compose


Languages

Language:Go 94.5%Language:Dockerfile 5.5%