Image Proccessing API
An API that make use of Sharp JS for resizing images and provide a link as a placeholder for your project
Project Setup
-
Clone the repo || Download it as ZIP file
-
Make sure you are inside the project's root directory then run
npm install
-
Next you have to compile the project from typescript to javascript by running
npm run compile
-
Finally,
npm run start
to start the server then visit the API endpoint like-so
http://127.0.0.1:3000/api/images?filename=fjord.jpg&width=200&height=200
- filename must be in jpg format and the actual image is in
/public/imgs/full
folder.- All three queries ( filename - width - height) have to be provided.
Additional Scripts
-
To test the application, you need to compile first
npm run compile
, then runnpm run test
to run tests -
Prettier and ESlint is integrated out-of-the-box
npm run prettier
ANDnpm run linting
are their scripts respectively