This api resizes the image to the user's desired size using TypeScript and Express.
Going to the URL at How to Install and Run the Project #7 resizes the image provided and saves it to ./images/thumbnails. The api has caching so that repeated requests to the endpoint use pre-stored images rather than regenerating a new image each time.
Testing endpoints and image processing using Jasmine.
This Image Processing API project is for Udacity's Full Stack JavaScript Developer nanodegree program.
- Clone the project
git clone https://github.com/hykim-soulis/Image-Processing-API.git
- Go to the project directory
cd project-directory
- Install image processing api with npm
npm install
- Start project with npm (default port: 3000)
npm run start
- Build project
npm run build
-
Save the image you want to resize at ./images/full directory
-
Access the following endpoint with your image filename and desired width and height.
localhost:PORT/api/images?fileName=FILE NAME&width=WIDTH PIXEL&height=HEIGHT PIXEL
-
Example full url: santamonica, 200X200
http://localhost:3000/api/images?fileName=santamonica&width=200&height=200 -
You can use your own images or use the ones provided in this repo
- encenadaport
- fjord
- icelandwaterfall
- palmtunnel
- santamonica
- Express
- Middleware
- Typescript
- Image processing module sharp
- Jasmine