Clone this repository with git:
git clone https://github.com/markpassawat/go-grpc-coinlist.gitCreate docker for postgeSQL on port 5432 with password and max connection setting:
docker run --name coin-list-database -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres -N 300Create database and insert 150 default coins:
go run cmd/create-database/main.goRun both command for run server:
source run gatewayFor run service:
source run coin_listUse Postman to testing APIs on localhost:8080 with (grps-coin-list.postman_collection.json) file :
- GetCoin :
GET /coins/:coin_id - GetCoins :
GET /coins - CreateCoins :
POST /coins/:coin_id - SearchCoins :
GET /coins/:search_text
If there are any problem, try run this command and do it again.
export PATH="$PATH:$(go env GOPATH)/bin"