This project uses Docker and Docker Compose to make deployment and execution of the application easier.
- Docker
- Docker Compose (version 1.6.0 or higher recommended)
- Node 14
- Clone the project repository to your local machine:
git clone https://github.com/my-user/my-project.git
- Navigate to the project directory:
cd my-project
- If you are using Docker Compose version 1.6.0 or higher, use the following command to start the containers:
docker-compose up -d
- If you are using an older version of Docker Compose, use the following command:
docker compose up -d
This will start the application containers in the background. You can check the status of the containers by running docker-compose ps.
- Run API
cd api/
npm start
- Run Worker
cd worker/
npm start
- Stopping the project
To stop the containers, use the following command:
docker-compose stop
Ctrl+C to stop node apis
- Removing containers
To remove the containers, use the following command:
docker-compose down
This will also delete any data stored in the application containers. If you want to preserve this data, use the docker-compose stop command instead.
docker-compose exec <service> <command>: run a command in a running container
docker-compose run <service> <command>: run a command in a new container
For more information on using Docker Compose, refer to the official documentation.
Create order :
POST http://localhost:3000/order
Get order