Skip to content

A Node.js REST API that creates greeting cards with cat images and a custom text

License

Notifications You must be signed in to change notification settings

snthamel/cat-card-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cat Card Application

A Node.js REST API that creates greeting cards with cat images and a custom text

Requirements

This site can be built and deployed to Docker container. For instructions on installing Docker, please visit https://docs.docker.com/get-docker/

Build

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

Demo

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

Testing

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

About

A Node.js REST API that creates greeting cards with cat images and a custom text

Topics

Resources

License

Stars

Watchers

Forks