The Gym API is a project designed to help users manage and track their workouts. With this API, users can create, update, and view their exercise routines efficiently.
Follow these steps to set up the project on your local machine:
Clone the Project:
git clone git@github.com:davidspader/gym-api.git
cd gym-api
Configure Environment Variables:
cp .env-example .env
.env
file to configure the environment variables:
POSTGRES_USER=your_user
POSTGRES_PASSWORD=your_password
POSTGRES_DB=your_database
DB_URL=postgresql://your_user:your_password@localhost/your_database
API_PORT=your_preferred_port
SECRET_KEY=your_base64_encoded_string
Install Go Modules:
go mod tidy
Start Docker Containers:
docker compose up -d
Run the SQL Script:
sql/script.sql
into your PostgreSQL database.Generate Test Data (Optional):
sql/data.sql
. Note that the default password for the test users is 123456
.Your system is now configured and ready to use!
You can access the API documentation at http://localhost:3000/swagger/index.html