https://github.com/mo2men-dev/image-processing-api
EGFWD Advanced Full-Stack Web Development Nanodegree Program, Project 1: Image Processing API
https://github.com/mo2men-dev/image-processing-api
Last synced: 2 months ago
JSON representation
EGFWD Advanced Full-Stack Web Development Nanodegree Program, Project 1: Image Processing API
- Host: GitHub
- URL: https://github.com/mo2men-dev/image-processing-api
- Owner: Mo2men-dev
- Created: 2022-07-18T01:16:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T10:39:03.000Z (almost 4 years ago)
- Last Synced: 2025-01-26T08:41:43.643Z (over 1 year ago)
- Language: TypeScript
- Size: 10.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Description
A simple Image Processing API for The EGFWD Nanodegree
# How to Install
1. clone the repository
2. cd into the directory
3. `npm install`
# Dependencies
- [express](https://expressjs.com/)
- [sharp](https://sharp.pixelplumbing.com/)
- [eslint](https://eslint.org/)
- [prettier](https://prettier.io/)
- [nodemon](https://nodemon.io/)
- [jasmine](https://jasmine.github.io/)
# Scripts
- `npm run build` : build the project for production
- `npm run dev` : start the project in development mode
- `npm run test` : run the tests
- `npm run lint` : run the linter
- `npm run start` : start the project in production mode
- `npm run prettier` : run the prettier formatter
# Usage
$ npm run dev
server listens on port 3000
### Instrunctions will be at :
(http://localhost:3000/api/images)
### Query Parameters :
- f : file name [required]
- Available Images : [encenadaport , fjord , icelandwaterfall , palmtunnel , santamonica]
- w : width of the image (1 < width 2000)
- h : height of the image (1 < height < 2000)
>Both w and h are optional. If both are not provided, the image will be returned in its original size but to resize the Image Both must be provided.
# Examples :
| Query | Response |
|-------|----------|
| `f=palmtunnel&w=100&h=100` | palmtunnel.jpg with a width of 100 and a height of 100 |
| `f=palmtunnel&w=100` | returns an Error Both width and height must be provided to resize |
| `f=palmtunnel&h=100` | returns an Error Both width and height must be provided to resize |
| `f=palmtunnel` | palmtunnel.jpg |