Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.45k stars 862 forks source link

Proposal: Expose JSON API Routes #1142

Open ysfdev opened 6 years ago

ysfdev commented 6 years ago

Reason

In some circumstances someone might need to use the available JSON API Routes without needing to mount the entire Express App instance through a middleware or from a standalone Kue instance.

Proposal

Expose the JSON API Routes, so it could be used as: const kueJsonRoutes = require('kue').json or through the App instance const kueJsonRoutes = require('kue').app.json

Will like to know what others thoughts are on integrating this. I can open a PR for changes if accepted.

Thanks!