Skip to content

I put together an image processing API that could be used as a microservice. ๐Ÿ†

Notifications You must be signed in to change notification settings

grand-rick001/Image-Processing-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

55 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Image-Processing-API

Project one of my Udacity nanodegree

1. Setup and configuration

To use this API, first run the command below to install node_modules

npm i

Then check the package.json file for the dependencies and devDependencies used, and install them accordingly as follows.

npm i express jasmine jasmine-spec-reporter morgan sharp supertest
npm i --save-dev typescript ts-node prettier nodemon eslint-plugin-prettier eslint-config-prettier eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin @types/supertest @types/sharp @types/node @types/morgan @types/jasmine @types/express

The tsconfig.json, eslint.json files are already configured for you.

2. Testing

Once you're done with that, run the predefined tests using the command below, to check if the API works.

npm run test

3. Running the application

When all tests pass, run either of these commands to start the application.

npm run start
OR
node build/.

This will log a message to the terminal that the server has started.

Server started at http://localhost:3000

Open your browser to that address, and you'll be greeted with a welcome message.

Edit the URL, using the format below.

http://localhost:3000/convert?fileName=name_of_image_in_assets&width=sample_width&height=sample_height

Image Example

Using the exact same url above, you'll later on see an image similar to this one below. Sample pic

Try it out with different widths and heights and enjoy the process ๐Ÿ˜Š.

Have fun!

About

I put together an image processing API that could be used as a microservice. ๐Ÿ†

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published