A multi-tenant rest api for managing gym operations.
Note: This api is still in early stages and updates will be added as they are ready to be shipped.
git clone https://github.com/emanuelquerty/gymulty.gitFirst make sure you have Go installed in your local computer. If not, you can download it by going to https://go.dev/doc/install and following the installation process. Once that is done, open the project you've just cloned in your editor of choice and run the following command in the terminal:
go getThis will add all required dependencies and install them.
Create a .env file in the root of the project with the following configuration variables:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=gymulty
DB_USERNAME=postgres
DB_PASSWORD=YourPostgresPasswordgo run ./cmd/http/.This will start a server listening on port 8080
go test ./...go build -o gymulty ./cmd/httpThis will build the executable named gymulty on the project root directory.
Run the generated executable:
./gymultyThis will spin up the api server on port 8080
Once the server is running, you can access the full API Documentation on http://localhost:8080/api/swagger/index.html to interact with the API via swagger UI or your tool of choice.