go-rest-api-template

command module
v0.0.0-...-352fc53 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 7 Imported by: 0

README

Go-REST-API-Template

  • Somewhat elegant repository to give HTTP REST API starter code in Go utilizing github.com/google/wire for dependency injection and building

  • Intended for fellow gophers and USFCA professors trying to learn better go practices (I'm talking to you Matt)

Setup

1. `cp config.env.template config.env`
2. Ensure you have golang installed 
3. Ensure you have wire installed... if not run `go get github.com/google/wire/cmd/wire`

To run

1. Make sure you have wire installed 
2. Run `make build` to build binary
3. Run  `make run` to execute the binary 

To test it's properly working

1. Run `curl --location --request GET 'http://localhost:8080/health' `, it should return a json health model with a current timestamp and boolean set to true 

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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