This project is a sample of creating a Web Api that capable of creating images of customized sizes according to the user's needs, instantly .
- Node and Express Environment
- Sharp package
- Simple-node-logger package
- HTML
- CSS
- ES6
- install packages by running this command
npm install
oryarn
. - run this command
npm run start
. - open
http://localhost:3000/api/images?fnm=santamonica&wdt=200&hit=150
in your browser and then try changing the image file name, width and height as well.
GET /api/images/?fnm={filename}&wdt={width}&hit={height}
Parameter | Type | Description |
---|---|---|
fnm |
string |
Required. filename of the desired image to be resized |
wdh |
number |
Required. desired width |
hit |
number |
Required. desired height |
Run prettier
npm run prettier
Run eslint
npm run lint
Build the project
npm run build
Run the application
npm run start
Clone the project
git clone https://github.com/Mahmoud-Elgharably/Image-Resizer-KitKat.git
Go to the project directory
cd Image-Resizer-KitKat
Install dependencies
npm install
Run the application
npm run start
To run tests, run the following command
npm run test