A Node.js REST API that creates greeting cards with cat images and a custom text
This site can be built and deployed to Docker
container. For instructions on installing Docker, please visit https://docs.docker.com/get-docker/
Run the following command within the project folder to build the API service docker image
docker build . -t cat-card-app
Run the following command to start the API service
docker run -v $PWD/src/tests/coverage:/usr/src/app/src/tests/coverage -p 3000:3000 -p 8080:80 -d --name cat-card-app cat-card-app
Once the API service is built and started using above commands, browse http://localhost:8080 on a web browser to view the demo application.
Alternatively, API documentation can be browsed through http://localhost:3000/api-docs
After starting the API service, run the following command to test the application
docker exec -it cat-card-app npm test
A coverage report can be generated by executing the following command
docker exec -it cat-card-app npm run test-coverage
The coverage report will be saved under <project-folder>/src/tests/coverage