This Image processing API serves two purses:
- It's used as a simple placeholder api, it allows users to query images from the server with the image name, width and height specified as parameters on the URL as seen below.
http://localhost:5000/api/v1/images?filename=fjord&width=200&height=200
- Second, this api can also be used to properly scale your images or resize your images based on the url parameters specified.
First, clone this repo and switch into the repo folder:
git clone https://github.com/ivanepou22/imageprocessing.git
Now you need to install the dependencies for the server code.
npm install
npm run start
npm run lint
npm run prettier
npm run test
Please place the images folder in both the dist directory and src.
1.Image Middleware √ 1.1: Should return a 404 status code and error message if the requested image is not found √ 1.2: Should send the requested image to the client if it is found in the "images/thumb" folder
2.Image Processing √ 2.1 Expect resizeImage function to not throw an error √ 2.2 Expect resizeImage function to throw an error