This is a simple store API written in Go using the Gin framework. It allows you to create, read, update, and delete products and categories.
- Clone the repository.
- Run
make installto download the dependencies. - Set the environment variable
DATABASE_URLwith your database connection string. - Run
make runto start the server.
Note: The server will start on port
8080by default. You can change this by setting thePORTenvironment variable.
GET /- Returns a welcome message.GET /ping- Returns a pong message.GET /products- Returns a list of all products.
make install- Downloads the dependencies.make build- Builds the project binary.make run- Builds and runs the project binary.make start- Runs the project without building.make test- Runs the tests.make clean- Removes the generated binary files.