You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
976 B
Markdown

2 years ago
# Resize-Api
2 years ago
The resize API allow to place images into your frontend with the size set via URL parameters for rapid prototyping.
2 years ago
A library to serve properly scaled versions of your images to the front end to reduce page load size.
Rather than needing to resize and upload multiple copies of the same image to be used throughout your site, the API handle resizing and serving stored images.
# Installation
2 years ago
1- Install packages dependencies.
`npm install`
2 years ago
2- build the project.
`npm build`
2 years ago
3- run the node server.
`node ./build/index`
2 years ago
You can also run the code through the nodemon devepement server.
`npm run start`
2 years ago
When the server is running, you can resize an image availible in the `images/full` folder by going to the following url and adding parameters to resize the image.
2 years ago
`http://localhost:5000/api/image?filename=encenadaport&width=200&height=200`
# Built with
- Typescript
- Node
- Sharp module to resize the image
- Express
- Git
# Author
2 years ago
Anis Benziane