The project implements a image rotation algorithm. This provides a class Rotator which can be imported to rotate an image at specific angle given in radian. rotator.js file has the source code for Rotator class in static directory. This algorithm has its limitation as well. The rotated image gets cropped from the sides when done on angles other than 90, 180, 270 and 360 degrees. The project uses Jest for testing and performance API to measure performance matrices.
For development, you will need Node.js, express.js and NPM installed in your environement.
Just go on official Node.js website and download the installer.
npm install express --save
git clone git@github.com:asgarzee/rotation.git
cd rotation
npm install
node app.js
http://localhost:3000
npm test
npm test -- --coverage
Steps to run using docker
docker build -t <your username>/node-rotation-app .
docker run -p 3000:3000 -d <name of your image repo>
http://localhost:3000