An image processing API to resize an image using Node.js and Sharp.
To resize an image visit 'http://localhost:3000/api/resize?filename=your_filename&width=width_you_want&height=height_you_want'. The API resizes the image using the sharp module, saves it to disk in thumbnail folder, and display it in the browser with the size set via URL parameters. If the same image is accessed later the API retrieves it from the disk.
To start the server run the npm run start
command from the terminal. Then visit 'http://localhost:3000/api/resize?filename=your_filename&width=width_you_want&height=height_you_want' from your browser.
- prettier:
npm run prettier
- eslint:
npm run lint
- build:
npm run build
- build then test:
npm run test
-
'ts-node' is not recognized as an internal or external command, operable program or batch file
-
node.js TypeError: path must be absolute or specify root to res.sendFile "failed to parse JSON"
- Shorouk Elkhateeb