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
cd
into the application directory - Run
npm install
to install all the dependencies - Run
npm run build
to build the project - Run
npm start
to run the application which will be server by default on port 8000 - Run
npm run test
to 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 |