🚀 This project is a microservice built with Go, leveraging GORM for database interactions and integrating with RabbitMQ for message brokering. It serves as a central point for managing requests and routing them to the appropriate services.
🔌 With a modular architecture, this microservice enables seamless communication across different services, facilitating efficient and scalable application development.
🔒 The use of GORM simplifies database operations, while RabbitMQ ensures reliable and asynchronous communication, allowing the microservice to effectively handle high volumes of requests.
🏗️ Whether you're developing a monolithic application or a distributed system, this microservice provides a robust foundation for your project.
To pull the Docker image from the GitHub Container Registry:
- Login to GitHub Container Registry:
echo "YOUR_GITHUB_TOKEN" | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
- Go to GitHub Packages and copy the command to pull the image.
To install the dependencies, run:
go mod tidy
To start the application in development mode:
go run main.go
To start the application in production mode:
go build -o app
./app
To start the application in debug mode, use your preferred debugger (e.g., Delve):
dlv debug
The application uses the following environment variables, which should be defined in a .env file at the root of the project:
RABBITMQ_DSN='amqp://guest:guest@localhost:5672/'
DATABASE_DSN='postgres://postgres:dima3raza@localhost:5432/go-template?sslmode=disable'
The following scripts are available in the Makefile
:
make update
make build
make start
make test
make test-coverage
To run the unit tests:
make test
To run the unit tests with coverage:
make test-coverage
This project is licensed under the MIT License - see the LICENSE file for details.