Just build docker with:
docker-compose up --build -d
To start:
- Enter inside
golang
container:docker-compose exec golang bash
- Build and run serve
go build && ./app
The server will be allocate on http://localhost/api/books
Config:
- Header:
Content-Type application/json
You can use:
- POST to create Books;
- GET to get Books and specific Book by ID;
- DELETE to delete Book by ID;
- PUT to update Book by ID
Create Book:
{
"isbn": "432432",
"title": "Andorinha",
"author": {
"firstname": "Carol",
"lastname": "Williams"
}
}