Gin-boilerplate - This repository contains boilerplate code of a REST service using Gin (golang) framework.

Boilerplate REST service using Gin web framework (golang)

Go Go Report Card

Introduction

This repository contains a boilerplate REST API service using Gin web framework.

This boilerplate can be used to quickly bootstrap a backend project with minimal changes. It uses most common and highly adpated libraries like zerolog for logging and viper for env configuration.

I have also written a blog where i explain the process behind creating this boilerplate, feel free to check it out.

Features

  • HTTP and HTTPS support
  • .env file and OS environment variables support
  • Models
  • Controllers
  • Routers
  • Request ID middleware
  • Request logging middleware
  • CORS middleware

Run locally

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

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

Similar Resources

Example golang using gin framework everything you need, i create this tutorial special for beginner.

Golang Gin Framework Fundamental Example golang using gin framework everything you need, i create this tutorial special for beginner. Feature Containe

Dec 16, 2022

Using golang framework (Gin) to create a web-application

News feeder Using golang framework (Gin) to create a web-application. This simpl

Aug 22, 2022

Clean Architecture using Golang with Gin framework

Clean Architecture using Golang with Gin framework Template Structure Gin is a web framework written in Go (Golang). It features a martini-like API wi

Dec 16, 2022

Simple web app using Go and Gin framework

go-gin-app Simple web app using Go and Gin framework Golang 과 Gin 프레임워크를 사용한 간단한 웹 앱 How to get Started Install Gin and have Go installed on your syst

Oct 18, 2021

Restful API example with using go and gin framework

simple device api Simple Device API is really simple and concise to show how easy to implement a Restful Service with using Golang. It uses gin framew

Nov 18, 2021

Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.

Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.

목차 1. 요약 2. 목표 3. API 목록 4. 프로젝트 구조 5. 패키지 별 기능과 관계 6. 사전 작업 6.1. DB, Table 생성 6.2. 모듈 생성 6.3. 패키지 다운로드 7. Gin 작성 7.1. 데이터베이스 설정 7.2. 테이블, 스키마 정의 7.3.

Jan 2, 2022

Go Server/API boilerplate using best practices DDD CQRS ES gRPC

Go Server/API boilerplate using best practices DDD CQRS ES gRPC

Go Server/API boilerplate using best practices DDD CQRS ES gRPC

Jan 6, 2023

The source code for workshop Scalable architecture using Redis as backend database using Golang + Redis

The source code for workshop Scalable architecture using Redis as backend database using Golang + Redis

Sep 23, 2022

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

Oct 10, 2021
Go (Golang) API REST with Gin FrameworkGo (Golang) API REST with Gin Framework

go-rest-api-aml-service Go (Golang) API REST with Gin Framework 1. Project Description Build REST APIs to support AML service with the support of exte

Nov 21, 2021
Dating-server - Go (Golang) API REST Template/Boilerplate with Gin Framework

go-rest-template Go (Golang) API REST Template/Boilerplate with Gin Framework 1.

Apr 3, 2022
Gin-errorhandling - Gin Error Handling Middleware is a middleware for the popular Gin framework

Gin Error Handling Middleware Gin Error Handling Middleware is a middleware for

Sep 19, 2022
REST API for a shoe store using Go and Gin Web Framework

REST API for a shoe store using Go and Gin Web Framework This API uses a local PostgreSQL database that's set through the /gopostgres/driverConfig.go

Dec 26, 2021
Demo application to implement a REST api backend service for an android app using the Go aah framework.

aah-recycleview-backend This tutorial is based on the aah framework to implement a REST API form of CRUD application services, taking "IN-MEMORY" stor

Jan 28, 2022
Go-gin-ddd-cqrs - Clean api rest with Go, Gin and GORM
Go-gin-ddd-cqrs - Clean api rest with Go, Gin and GORM

GOLANG API REST Clean api rest with Go, Gin and GORM. Clean Architecture with DD

Oct 21, 2022
Go-service-gin - Simple Web api application developed in Golang and Gin

Simple Web api application developed in Golang and Gin Initial Tutorial URL http

Jan 4, 2022
Go-gin-mongo-api - A backend RESTful API built using golang, gin and mongoDB

go-gin-mongo-API This is a RESTful backend API which is developed using the gola

Jul 19, 2022
GinGoExample - Implement rest api using gin and go and mongodb

GinGoExample Implement rest api using gin and go and mongodb Optimizations using Singlton pattern to avoid repetetive commiunication with mongodb . Fe

Mar 25, 2022
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework
GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework

GoCondor is a golang web framework with an MVC like architecture, it's based on Gin framework, it features a simple organized directory structure for your next project with a pleasant development experience, made for developing modern APIs and microservices.

Dec 29, 2022