Giter Club home page Giter Club logo

demo-fs-esl-go's Introduction

Golang Microservices Boilerplate

issues forks stars license CodeFactor

Example structure to start a microservices project with golang. Using a MySQL databaseSQL.

Manual Installation

If you would still prefer to do the installation manually, follow these steps:

Clone the repo:

git clone https://github.com/gbrayhan/microservices-go

If you need, configure the environment variables in file config.json, if you use docker-compose leave the variables set in the file config.json.example

cp config.json.example config.json

TL;DR command list

git clone https://github.com/gbrayhan/microservices-go
cd microservices-go
cp config.json.example config.json
docker-compose up  --build  -d

Table of Contents

Features

  • Golang v1.14: Stable version of go
  • Framework: A stable version of gin-go
  • SQL databaseSQL: MariaDB using internal sql package of go sql
  • Testing: unit and integration tests using package of go testing
  • API documentation: with swaggo a go implementation of swagger
  • Dependency management: with go modules
  • Environment variables: using viper
  • Docker support
  • Code quality: with CodeFactor
  • Linting: with ESLint

Commands

Build and run image of docker

docker-compose up  --build  -d

Swagger Implementation

swag init -g routes/ApplicationV1.go

To visualize the swagger documentation on local use

http://localhost:8080/v1/swagger/index.html

Unit test command

# run recursive test
go test  ./test/unitgo/...
# clean go test results in cache
go clean -testcache

Lint inspection of go

golangci-lint run ./...

demo-fs-esl-go's People

Contributors

kevinnguyenai avatar

Watchers

 avatar  avatar

Forkers

xvmvx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.