This is a sample application to demonstrate Docker, Docker Compose, and GitHub Actions.
You can find the articles related to this repository here.
To run the this application using Docker using VS Code,
- Install Docker Desktop which will install Docker Engine.
- Install the Docker VS Code Extention.
- Right-click the
docker-compose.yml
file and click theCompose Up
command. - The express app will be accessible on
http://localhost:5000
. - You can use Postman to execute queries. If you want example queries, refer to
books.postman_collection.json
.
If you prefer to use the command line, then run the following command in the root of the project:
docker-compose up
The logs can be monitored using Docker Desktop.
To shut down the todo application, right-click the docker-compose.yml
file and click the Compose Down
command.
For the command line:
docker-compose down
- Node.js (v20 or greater)
- MongoDB (MongoDB Compass is optional)
- Clone the GitHub repository.
git clone git@github.com:anikeshk/ci-books.git
- Install dependencies.
npm install
- Copy the
.env.example
file to.env
and make any necessary changes.
cp .env.example .env
- Build and run the server.
npm run build && npm run start
The backend API is now accessible at http://localhost:5000
.
- Run the tests.
npm run test