Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 1.19 KB

README.md

File metadata and controls

65 lines (39 loc) · 1.19 KB

Golang Microservice

Introduction

Hey GO-pher

This is a basic microservice architecture written in Golang to strengthen my grip on microservices and Golang.

Featuring

Currently, it features authentication services, with plans to add more services in the future.

Setup Locally

Using Go

To set this up locally, follow these steps:

  1. Download all of the required dependencies:
go mod download
  1. Build the project:
go build main.go
  1. Run the project:
go run main.go

Using Docker

You can also run the project using Docker. Follow the steps below:

  1. Pull the pre-built Docker image from Docker Hub:
docker pull deshwalankush23/microservice
  1. Run the Docker container:
docker run -d -p 3000:3000 deshwalankush23/microservice

This command will run the container and map port 3000 of the container to port 3000 on your local machine.

Using Docker Compose

Alternatively, if you have Docker Compose installed, you can use the following command to start the application:

docker-compose up

This will start the service based on the docker-compose.yml configuration file.

Enjoy Coding with Golang!