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.
cd
to root dir of project.- run
npm install
to install project dependancies.
- run
npm run prod:start
, this will build the project to javascript and run theindex.js
file. - go to you browser and hit the resize endpoint.
- You will see the rezied image.
- Testing: run
npm run test
to test endpoint and server and project utilities. You will see result in terminal. - Format: run
npm run format
to format project code using prettier. You can adjust.prettierrc.json
file for personalized configuration according to prettier docs. - Linting: run
npm run lint
to lint the project code. You can edit.eslinrrc.js
See: ESLint Documentation.
- Typescript
- Sharp
- Nodemon
- Prettier
- ESLInt
- Jasmine
- Supertest
- nodemon
- dotenv