This is a simple NodeJS project that binds two cat images together with texts of your choice. This uses Cat as a Service (https://cataas.com).
- Fetches an image of a cat with some custom text
- Fetches an image of another cat with some more custom text
- Binds these images together into one image
- Saves the resulting image as a file
When running Bindr, users can input following properties.
greeting
- Greeting textwho
- Name textwidth
- Width of the imageheight
- Height of the imagecolor
- Color of the textsize
- Size of the text
You can run the Bindr by running npm start
command.
If you want to pass custom inputs for different properties, you can run bindr as follows.
Ex:
- Custom greeting text -
node index.js --greeting welcome
- Text color blue -
node index.js --color Blue
Run the command npm test
- Build the docker image with
docker build . -t <user-alias>/bindr
- Run a docker container with the built image
docker run -p 49160:3000 -d <user-alias>/bindr
- Check the image generated by entering the container instance
docker exec -it <container id> /bin/bash