Golang REST API Boilerplate

Simple golang REST API boilerplate with service discovery and remote config supported by Consul.
Prerequisite
Things that you need to do before running this boilerplate:
- Make sure, your consul service already running.
- Provide your configuration in consul KV. For more details see this post.
- If you're not using consul, please provide local configuration file by rename
.app-config.example.yaml
to .app-config.yaml
.
How to run
Run command below:
$ go build -o boilerplate .
$ ./boilerplate serveHttp --consul localhost:8500
In this case, consul service run at port 8500
by default.
Try hit this endpoint
curl --location --request GET 'http://localhost:8080/v1/ping'
License
Copyright © 2020, Bareksa Portal Investasi.
Released under the MIT License.