- Ensure you have Docker and Docker Compose installed on your system.
-
Navigate to the Root Folder:
Open your terminal and navigate to the root directory of the project where the
docker-compose.yml
file is located. -
Build the Docker Containers:
Execute the following command to build the Docker containers for the service:
docker compose build
-
Start the Docker Containers:
Run the following command to start the service:
docker compose up
-
Access the Services:
- Backend: Load the backend service in your browser or API client via http://localhost:3001.
- Frontend: Load the frontend service in your browser via http://localhost:3000.
The backend service provides the following API routes:
-
Route to get all brands data:
GET /brands
Description: Retrieves a list of all brands.
-
Route to get a brand by ID:
GET /brands/:id
Description: Retrieves a specific brand by its ID.
-
Route to get products by brand ID:
GET /brands/:id/products
Description: Retrieves a list of products associated with a specific brand ID.
-
Route to get stores by brand ID:
GET /brands/:id/stores
Description: Retrieves a list of stores associated with a specific brand ID.
-
Route to get stores by product ID:
GET /products/:productId/stores
Description: Retrieves a list of stores associated with a specific product ID.
To stop the running Docker containers, use the following command:
docker compose down
This will stop and remove the containers defined in the docker-compose.yml
file.
-
Backend:
- Framework: Express.js
- Language: TypeScript
-
Frontend:
- Library: React.js