rest-api-boilerplate

command module
v0.0.0-...-60fa4c6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 1 Imported by: 0

README

Golang REST API Boilerplate

forthebadge

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:

  1. Make sure, your consul service already running.
  2. Provide your configuration in consul KV. For more details see this post.
  3. 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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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