Boilerplate REST service using Gin web framework (golang)
This repository contains a boilerplate REST API service using Gin web framework.
I have also written a blog where i explain the process behind creating this boilerplate, feel free to check it out.
- HTTP and HTTPS support
- .env file and OS environment variables support
- Request ID middleware
- Request logging middleware
- CORS middleware
This repo does not contain a Dockerfile at the moment so i'm listing down steps for running this service locally.
- Get dependencies
go get .
- Set environment variables Fill out the sample .env file provided in the repository
go run main.go command at the repository root to start the service.
Running in Docker
The repo includes sample Dockerfile and docker-compose.yaml files.