Getting Started with Express.js to Build a JSON API in Node
Before you begin, ensure you have met the following requirements:
- Docker: Install Docker on your system. You can download it here.
To get this project up and running, follow these steps:
-
Clone this repository:
git clone <repository-url> cd project-directory
-
Create a .env file and set any environment variables your project requires. Refer to the .env.sample file for examples.
-
Build and start the Docker containers of docker-compose.yaml:
docker compose --env-file .env up -d
- Stoping all containers of docker-compose.yaml:
docker compose stop
- Show logs of specifc container of docker-compose.yaml
docker logs -f <container_name>
- Drop all containers and delete all images of docker-compose.yaml
docker compose down --rmi all