- Entrypoint of the server is on
cmd
directory:cmd/omdb_grpc/main.go
config
directory contains configuration files for the server. Onconfig.go
file, you can find the configuration for the server, database, and the JWT secret key, usingviper
to Unmarshal yaml files.internal
directory contains all the services and internal packages for the server, including new database connection usingGORM
forPostgreSQL
and database entitymodels
.tests
directory contains utilities required to run unit tests.- Each functional components on
internal
contains its ownrepository
, which handles queries and database operations,service
which handles business logic, andgrpc
which handles the gRPC methods.
- Clone this repository
- Install
docker
anddocker-compose
if not yet on your machine. - Run
docker compose -f docker-compose-test.yaml up
on the root directory of this repository. - Server will be available on
localhost:55000
- Feel free to test the API from Postman or other gRPC clients.
go test ./... --cover