Create a gist now

Instantly share code, notes, and snippets.

@michikono /kue.js
Last active Dec 20, 2015

What would you like to do?
module.exports = function (app, config, passport, express) {
var kue = require("kue");
var auth = express.basicAuth(function(user, pass, callback) {
var result = (user === 'username' && pass === 'password');
callback(null /* error */, result);
// any kue related settings can go here'title', 'Jobs');
// create a wrapper to add auth on since without it we can't globally wrap kue's paths
var subApp = express()
// add authentication
// re-add (but dont put it in its own folder)
// bind the subApp to the desired path
app.use('/secret_location/kue', subApp)
var app = express()
// needs to come early due to order mattering
require('./config/kue')(app, config, passport, express)
// express settings
require('./config/express')(app, config, passport)
// the rest of your routes, etc.

This comment has been minimized.

Show comment
Hide comment

Error: Internal: Object function createApplication() has no method 'basicAuth'


This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment