go-api-template

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

go-api-template

startup api template in go

Prerequisite

  • GO v1.12
  • PostgreSQL
  • Redis

Setting up the application

  • Create a environment file for your application
cp .env.example .env

Build the project

Build application directly, and find the binary at ./build

make build

Build application without go installation

make docker-img
make build-macos-docker

Or, type make help to check variety actions

  all                  clean and run
  build                go build from local
  build-linux          go build for linux
  build-macos          go build for linux
  docker-img           download build image
  build-macos-docker   docker build
  build-linux-docker   docker build for linux
  test                 go test
  coverage             show coverage report in html
  clean                go clean
  run                  build and run go binary
  run-dev              run with live reload

Develop the project

Install live-reload package for go app

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1
cmd
core
log
services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL