- Go 1.18+
- MongoDB (local or cloud)
- Git
git clone https://github.com/rzmsv/golang-echo-mongodb.git- Rename
.env.exampleto.envand fill in the necessary configurations. - For install dependencies run this command :
go mod tidy
- For run app run this command :
make start
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/products |
List all products |
| POST | /api/v1/products/new-products |
Create a product |
| GET | /api/v1/products/:id |
Get product by ID |
| PATCH | /api/v1/products/:id |
Update product by ID |
| DELETE | /api/v1/products/:id |
Delete product |