Get up and running quickly with a Go web service.
- Go 1.13 or higher (Installation Instructions)
- For macOS,
brewworks well
- For macOS,
- docker (Installation Instructions)
git clone https://github.com/nickhstr/go-web-service.git
cd go-web-service
makeFor 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 devThat 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 testTo run all tests, and watch for changes:
make test-watchTo open the app's test coverage report in a browser:
make coverage-htmlLint all .go files in the repo:
make lint