Get up and running quickly with a Go web service.
- Go 1.13 or higher (Installation Instructions)
- For macOS,
brew
works well
- For macOS,
- docker (Installation Instructions)
git clone https://github.com/nickhstr/go-web-service.git
cd go-web-service
make
For local development, create a .env
file at the project's root, with the PORT
variable set to whatever port you desire, otherwise it defaults to 3000. Ex: PORT=8080
To start the server:
make dev
That will not only compile and start the server, but it will recompile and restart the app on file changes.
To run all of the app's tests, and print their coverage:
make test
To run all tests, and watch for changes:
make test-watch
To open the app's test coverage report in a browser:
make coverage-html
Lint all .go
files in the repo:
make lint