Skip to content

epociask/go-rest-api-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published