curl http://localhost:8080/swagger/index.html
List Cocktails
curl -X 'GET' 'http://localhost:8080/cocktails'
Get Cocktail by Id
curl -X 'GET' 'http://localhost:8080/cocktail/1'
Add Cocktail
curl -X PUT localhost:8080/cocktail -d '{"Name":"Negroni","Ingredients":"30 ml Gin, 30 ml Bitter Campari, 30 ml Sweet Red Vermouth","Method":"Pour all ingredients directly into a chilled old fashioned glass filled with ice, Stir gently.","Garnish":"Garnish with a half orange slice."}'
Add Cocktail
curl -X DELETE localhost:8080/cocktail/1
curl -X POST localhost:8080/login -d '{"Email":"Negroni","Password":"30 ml Gin"}'
go mod init drinks-api
go mod tidy
- Start BD
db/docker-compose up
- Start app
go run main.go
go get -u github.com/swaggo/swag/cmd/swag
swag init