This is an eCommerce project build using go programming. It provides APIs to retrieve and create products.
Before running the project, ensure that you have the following dependencies installed on you machine.
- Docker
- Docker Compose
Follow the steps below to run the project:
-
Clone the repository to your local machine:
git clone <repository.url>
-
Navigate to the project directory:
cd ecommerce
-
Update the database configuration: Open
products/resources/yml/db.yaml
file and pdate the following properties.host
(should be the hostname or IP address of your database container)port
(should match the exposed port of your database container)user
(the database username)password
(the database password)name
(the name of the database)
-
Build and run the project using Docker compose:
docker-compose up --build
the command will build the docker images and start the container for the application and the database
- Once the containers are running. you can access the application at
http://localhost:8000
- GET/products - Retrieve all products
- POST/products - Create a new product