Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

This project is a microservice built with Golang. It serves as a point for handling requests.

License

Notifications You must be signed in to change notification settings

pieceowater-dev/lotof.template.go.service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lotof.template.go.service

Description

🚀 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.

Installation

Docker Installation

To pull the Docker image from the GitHub Container Registry:

  1. Login to GitHub Container Registry:
    echo "YOUR_GITHUB_TOKEN" | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
  2. Go to GitHub Packages and copy the command to pull the image.

Manual Installation

To install the dependencies, run:

go mod tidy

Running the Application

Development Mode

To start the application in development mode:

go run main.go

Production Mode

To start the application in production mode:

go build -o app
./app

Debug Mode

To start the application in debug mode, use your preferred debugger (e.g., Delve):

dlv debug

Environment Variables

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'

Scripts

The following scripts are available in the Makefile:

Update dependencies

make update

Build the project

make build

Start the application

make start

Run unit tests

make test

Run unit tests with coverage

make test-coverage

Testing

To run the unit tests:

make test

To run the unit tests with coverage:

make test-coverage

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

PCWT Dev Logo

About

This project is a microservice built with Golang. It serves as a point for handling requests.

Topics

Resources

License

Stars

Watchers

Forks

Packages