Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/educhinski/image-processing-api
A Node.js Image Processing API
https://github.com/educhinski/image-processing-api
api express image-processing jasmine node-js supertest typescript udacity
Last synced: about 2 hours ago
JSON representation
A Node.js Image Processing API
- Host: GitHub
- URL: https://github.com/educhinski/image-processing-api
- Owner: educhinski
- License: mit
- Created: 2022-12-27T06:46:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-16T20:05:03.000Z (about 1 year ago)
- Last Synced: 2024-11-05T18:55:40.282Z (about 2 months ago)
- Topics: api, express, image-processing, jasmine, node-js, supertest, typescript, udacity
- Language: TypeScript
- Homepage:
- Size: 10.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-processing-api
A Node.js Image Processing API, written in TypeScript.
This api receives image filename, edits images based on dimensions parsed in the query parameters, saves them and renders the resized images. It uses [sharp](https://www.npmjs.com/package/sharp) module to process the images.
## Setup
First clone the project here on github
```bash
git clone https://github.com/educhinski/image-processing-api.git
```Install the dependencies
```bash
npm install
```Run the project locally
```bash
npm run start
```Run the production
```bash
npm run start:prod
```Run the tests
```bash
npm run test
```For style enforcing and formatting
```bash
npm run prettier && npm run lint
```## Usage
The server will run on `localhost:3000/` and the api will be at `/api/images`
### Example usage
The following are the available filename:
- encenadaport
- fjord
- icelandwaterfall
- palmtunnel
- santamonicaExample queries
Correct:
`http://localhost:3000/api/images?filename=fjord&width=300&height=300`
Incorrect:
`http://localhost:3000/api/images?filename=fjord`
`http://localhost:3000/api/images?filename=nonexistent`
`http://localhost:3000/api/images?filename=fjord&width=200`
`http://localhost:3000/api/images?filename=fjord&height=200`
`http://localhost:3000/api/images?filename=fjord&height=one`