This API functions as a image resizing tool using sharp
-
'Resize' : url/resize?filename&width&height
Example for hitting endpoint using provided images :
localhost:3000/resize?fileName=fjord&width=400&height=200
- clone this repo.
cdto root dir of project.- run
npm installto install project dependancies.
- run
npm run prod:start, this will build the project to javascript and run theindex.jsfile. - go to you browser and hit the resize endpoint.
- You will see the rezied image.
- Testing: run
npm run testto test endpoint and server and project utilities. You will see result in terminal. - Format: run
npm run formatto format project code using prettier. You can adjust.prettierrc.jsonfile for personalized configuration according to prettier docs. - Linting: run
npm run lintto lint the project code. You can edit.eslinrrc.jsSee: ESLint Documentation.
- Typescript
- Sharp
- Nodemon
- Prettier
- ESLInt
- Jasmine
- Supertest
- nodemon
- dotenv