Pixely is an image processing API that I made as part of my Full Stack JavaScript Developer Nanodegree from Udacity.
Currently the functionality is limited to resizing and processing images and setup an image caching system.
It demonstrates my understanding of Typescript, NodeJS, NodeJS Middleware, Express, Express Router, Endpoints, Node File Management, Unit Testing.
NodeJS was used for the runtime.
Express was used for the backend.
Jasmine was used for the unit testing.
Sharp was used for the image processing.
Typescript was used as the programming language.
Endpoints
Endpoint | Request | Parameters | Response | Usage |
---|---|---|---|---|
/ | GET | N/A | 200 | Root Route |
/resize | GET | filename, width, height | 200 | Resize Images |
A full suite of tests are ready to use that cover all endpoints and helper functions
You can use
npm run jasmine
To start the unit testing
+---assets
| | encenadaport.jpg
| | fjord.jpg
| | icelandwaterfall.jpg
| | palmtunnel.jpg
| | santamonica.jpg
| | test.png
| |
| \---thumbnails
|
+---spec
| \---support
| jasmine.json
|
\---src
| index.ts
|
+---middleware
| logger.ts
|
+---routes
| | index.ts
| |
| \---api
| resize.ts
|
+---tests
| +---endpointsSpecs
| | resizeSpec.ts
| | indexSpec.ts
| |
| +---helpers
| | reporter.ts
| |
| \---utilitiesSpecs
| fileHandlerSpec.ts
|
\---utilities
fileHandler.ts
imageHandler.ts
You can get the project up and running in simple steps.
npm install
Then you can use the following endpoint to process your images.
http://localhost:5000/convert?filename=fjord&width=100&height=500