https://github.com/steveoversea/imageprocessingapi
Udacity Full Stack Javascript Project: API for resizing uploaded images
https://github.com/steveoversea/imageprocessingapi
image-processing nanodegree-project sharp
Last synced: 6 months ago
JSON representation
Udacity Full Stack Javascript Project: API for resizing uploaded images
- Host: GitHub
- URL: https://github.com/steveoversea/imageprocessingapi
- Owner: SteveOverSea
- Created: 2021-05-05T07:00:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T14:46:34.000Z (over 4 years ago)
- Last Synced: 2025-03-26T05:13:11.650Z (9 months ago)
- Topics: image-processing, nanodegree-project, sharp
- Language: JavaScript
- Homepage:
- Size: 11.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Processing API
This project is part of the Udacity Full Stack JavaScript Nanodegree.
The task was to build an API that returns requested image files with a certain width and height specified by the query parameters of the request.
Technologies:
* TypeScript
* Express
* Express-FileUpload (File-Upload Middleware)
* ESLint & Prettier
* Jasmine & Supertest
* Sharp (Image Processing)
## Install
Install all the modules
```
npm install
```
Start the server which will also build the TypeScript fuils and start nodemon
```
npm run start-build
```
Go to localhost:3000 to see the index.html file, where you can upload an image or send an API request via the HTML form
Run the test-suite with
```
npm run test
```
## API Request
The query uses following template
```
localhost:3000/api/image?
filename={requested_filename}
&width={requested_width}
&height={requested_height}
```
## Processed Images
Already processed images can be accessed through the same format as the API request.
The images itself are saved as {filename}{width}x{height}.{ext}