This is an express webapp that accepts an image file name and then shrinks it to the the dimensions specified using Sharp Library
To get this application run locally:
- Clone this repository and
cdinto the application directory - Run
npm installto install all the dependencies - Run
npm run buildto build the project - Run
npm startto run the application which will be server by default on port 8000 - Run
npm run testto run the test cases
| Method | Endpoint | Description | Response |
|---|---|---|---|
| GET | /api/images?name=fjord&width=200&height=200 | Resizing image Endpoint | 200 OK |
| GET | /api/images?name=&width=&height= | Missing Params in query string | 400 Bad Request |
| GET | /api/images?name=fjord&width=p50&height=g400 | Invalid dimensions | 400 Bad Request |
| GET | /api/images?name=invalidName&width=200&height=200 | Name doesnt exist | 404 Not Found |