8000 GitHub - moemoe89/go-mongodb-gita: 🎙️ This repo for practicing MongoDB using Golang (Gin Framework), Docker, Travis CI and Coveralls
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🎙️ This repo for practicing MongoDB using Golang (Gin Framework), Docker, Travis CI and Coveralls

License

Notifications You must be signed in to change notification settings

moemoe89/go-mongodb-gita

Repository files navigation

Build Status Coverage Status Go Report Card

GO-MONGODB-GITA

Practicing MongoDB Using Golang (Gin Gonic Framework) with Go Mod as Programming Language, MongoDB as Database

Directory structure

Your project directory structure should look like this

  + your_gopath/
  |
  +--+ src/github.com/moemoe89
  |  |
  |  +--+ go-mongodb-gita/
  |     |
  |     +--+ main.go
  |        + api/
  |        + routers/
  |        + ... any other source code
  |
  +--+ bin/
  |  |
  |  +-- ... executable file
  |
  +--+ pkg/
     |
     +-- ... all dependency_library required

Requirements

Go >= 1.11

Setup and Build

$ mkdir -p src/github.com/moemoe89
$ cd src/github.com/moemoe89
$ git clone <url>
$ mv <cloned directory> go-mongodb-gita

Running Application

Make config file for local :

$ cp config-sample.json config-local.json

Build

$ go build

Run

$ go run main.go

How to Run with Docker

Make config file for docker :

$ cp config-sample.json config-docker.json

Build

$ docker-compose build

Run

$ docker-compose up

Stop

$ docker-compose down

How to Run Unit Test

Run

$ go test ./...

Run with cover

$ go test ./... -cover

Run with HTML output

$ go test ./... -coverprofile=c.out && go tool cover -html=c.out

License

MIT

About

🎙️ This repo for practicing MongoDB using Golang (Gin Framework), Docker, Travis CI and Coveralls

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0