This app will provide todo functionalities in HTTP API format
Postman online doc:
LinkPostman collection:
provided in the root of the project, it can be used after being imported to Postman
Gateway:
This service acts as the entry point for the network, accepting and processing HTTP API requests. It utilizesgRPC
orEvent
mechanisms for various operations.User:
The User service is responsible for managing user-related functionalities. It offers support for bothgRPC
andEvent
protocols for different operations.Auth:
This service is used to handle authentication and token management which supportsgRPC
Todo:
The Todo service is designed for managing todos and their associated items. It provides support for bothgRPC
andEvent
protocols.
First you need to clone the repo and pull these images:
git clone https://github.com/behnambm/todo.git
docker pull rabbitmq:3.12-management
docker pull golang:1.20
then run this script to run the project(it uses docker compose
):
chmod +x ./start.sh
./start.sh
Unfortunately because of the limited time there are no unit tests but for gateway
service some tests are provided that
only can be used after all the services are up and running and the test will be made against real services.
To run the gateway service tests, navigate to the gatewayservice
directory and set the environment variable for the listen port (ensure it matches the one defined in the docker-compose file):
cd gatewayservice
export HTTP_LISTEN_URL=http://localhost:2020
go test server/httpserver/server_test.go