Skip to content

Priority job queue implementation using Kue, Redis, Express

Notifications You must be signed in to change notification settings

npkumar/node-image-queue

Repository files navigation

Priority job queue implementation using Kue, Redis, Express

Application has been bootstrapped using Express Generator

Image resize and conversion is done using Sharp Library

Worker job queue has been created using Kue.JS

Error responses created using Express Boom

Promise Library Bluebird

Process manager for node application PM2

Known Issues

Sharp library mentioned above has been used for image manipulation. Currently works for jpeg/jpg to png conversion and resize only. I have not looked further to rectify this issue.

Testing

Tested on Ubuntu 18.04

Tests have been written using Mocha

HTTP assertions using Supertest

Test stubs using Sinon JS

Usage

docker-compose up

This step:

  1. Builds the images
  2. Installs npm packages
  3. Runs the tests
  4. Launches the two services: app (Express server) and imageWorker (Processes jobs in queue)

npm install && npm run test

Runs the tests for application

npm install && npm run lint

Lints the code. eslint-config-google configuration has been extended.

Endpoints

GET /image/:id/thumbnail Request PNG thumbnail version of an image

POST /image/ Sumbit an image for processing to PNG thumbnail

Full API Docs for routes can be found at routes/images.js

About

Priority job queue implementation using Kue, Redis, Express

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published