One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
run all make commands with clean tests
make all build
build the application
make build
run the application
make run
Create DB container
make docker-run
Shutdown DB container
make docker-down
live reload the application
make watch
run the test suite
make test
clean up binary from the last build
make clean
Mac/Windows/Linux agnostic .air.toml file. I was able to accomplish this by:
- During
make watch
, I addexport WATCHING="true"
to check if I'm watching. So we can build the executable intotmp/main
instead formake build
. - Remove
bin
inside.air.toml
. This is so that it checkstmp/main.exe
for windows and checkstmp/main
for other OS (default behavior). - Adding an if statement that checks
$$(go env GOHOSTOS) = "windows"
. - If "windows", I build it in tmp/main.exe.
- If else, I build it in tmp/main.