This document provides instructions on how to set up and run the Go project using the provided Makefile
commands.
make air
)make ngrok
)Ensure you have these dependencies installed before running the commands.
Before running the project, ensure that you have the following installed:
Makefile
.Install Packages
go mod download
Verify Packages If it's your first time running the project, ensure all dependencies are set up:
go mod tidy
Running the Project
go run .
Running the Project Using Air
air
You can run the project using the Makefile
, which provides several commands for various tasks. Below are the steps to run the project:
Install Packages
make download
Verify Packages If it's your first time running the project, ensure all dependencies are set up:
make tidy
Running the Project
make run
Running the Project Using Air
make air
You can run the project using the Docker
, using the following steps
Compose the Image
docker-compose up --build
You can also run the command above in detach mode by specifying -d
flag in the end
Remove the Image If you are done with running the docker image and want to remove the image, run the ocmmand below
docker-compose down
To run tests:
make test #or go list ./... | grep -v "/config$$" | grep -v "/routes$$" | xargs go test -v
To generate a coverage report:
make coverage #or go list ./... | grep -v "/config$$" | grep -v "/routes$$" | xargs go test -v -coverprofile=coverage.out
To automatically re-run the application on changes:
make air #or air
To clean up the generated files:
make clean #or rm -rf coverage coverage.out coverage.html