Bracketcore / go-rest-api-template

Starter template for developing rest apis in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Rest Api Template

Initial scaffolding for Go rest API development using gin-gonic. Starter template for building your Go and Go Rest api applications.

Features

  • Database setup for GORM models
  • JWT authentication
  • Routing
  • Test environment setup
  • Support for multiple RDBMs

Built With

This App was developed with the following stack:

  • Golang
  • Gin-Gonic Framework
  • GORM

Requirements

  • go v1.14+
  • gin-gonic v1.6+
  • gorm v1.9+

Installation

  • fork this repository
  • create .env file as shown in the .env_example file
  • setup your database
  • on the terminal cd into the app folder
  • run go install to install required modules

Running the App

  • run go run <the-app-folder>

Usage

  • src/models holds your models module
  • src/controllers holds your controller files
  • src/repository holds your repository files
  • src/routes/api contains your route definitions
  • Happy usage.

Licence

  • MIT

Credits

About

Starter template for developing rest apis in go


Languages

Language:Go 100.0%