Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hussainalqurain/image-processing-api

Image processing api is built using nodejs, Typescript, Jasmine, express. Ready to be Scalable.
https://github.com/hussainalqurain/image-processing-api

eslint express jasmine javascript nodejs prettier sharp typescript

Last synced: 23 days ago
JSON representation

Image processing api is built using nodejs, Typescript, Jasmine, express. Ready to be Scalable.

Awesome Lists containing this project

README

        

## Scripts:
### -prettier: npm run prettier
### -lint: npm run lint
### -jasmine: npm run jasmine
### -run unit tests: npm run test
### -build: npm run build
### -start server: npm run start
### -after building the project we can run the server using node ./build/server.ts

## Usage:
### -The server will listen on port 3000:

## Endpoint to resize images:
### -http://localhost:3000/api/images

## query arguments are:

## filename: Available images are:
#### -encenadaport
#### -fjord
#### -icelandwaterfall
#### -palmtunnel
#### -santamonica
### width: pixel value
### height: pixel value
## Examples
### -http://localhost:3000/api/images Will display the list of available image names
### -http://localhost:3000/api/images?filename=encenadaport Will display the original encenadaport image.
### -http://localhost:3000/api/images?filename=fjord&width=200&height=200 Will scale the fjord image to 200 by 200 pixels and store the resulting image. Future calls will serve the resized image instead of resizing the original again.

## Notes:
### file extension checking is not fully implemented.
### files are server from images folder, and processed are stored in processed folder.