This project designs APIs for image processing that allows the user to visit a url and using url parameters, resize the image based on the parameters provided. Upon viewing an image that’s already been resized, a cached image will be served.
1- Download & Install node.js (https://nodejs.org/en/download/) 2- Install Typescript, Express, Jasmine for testing.
- navigate to (localhost:3000/api/images?filename=ironman&height=60&width=60)
- navigate to (localhost:3000/api/thubnails)
- npm install
- npm run start
- npm run test
- npm run build
- npm run lint
- npm run prettier
The API offers one endpoint to access and resize images available in the public/images/full folder.
The endpoint is api/images and requires three query params:
| Query Param | Value |
|---|---|
| filename | the filename (without extension) of one of the images available in the folder |
| height | it should be a positive integer |
| width | it should be a positive integer |