Automattic / kue

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

UI Routes to existing Express/Restify App #873

Open qrpike opened 8 years ago

qrpike commented 8 years ago

I searched issues and couldn't seem to find anything, is it possible to just add the Kue UI to my existing application?

For instance

var restify = require('restify');
var kue = require('kue');
var server = restify.createServer({
    name: 'my-app',
    version: '1.0.0',
});

// Setup Server
server.use(restify.acceptParser(server.acceptable));
server.pre(restify.fullResponse());
server.use(restify.dateParser());
server.use(restify.queryParser());
server.use(restify.jsonp());

// Send Kue UI routes to Kue
server.use('/kue', kue.ui);

// My actual routes:
server.blahblah()

server.listen( process.env.PORT || 8080 );
bilbof commented 7 years ago

I was able to get this to work locally with

server.use('/kue', kue.app);

However, I haven't yet managed to get this to work on Heroku.

thierryskoda commented 7 years ago

I'm following.

thierryskoda commented 7 years ago

Oh nevermind. It worked for me locally and on Heroku with

app.use('/kue/', kue.app)

I also added this line where I add all my other routes and I made sure I created my queue before calling this line.

joaoritter commented 7 years ago

@thierryskoda are you using Restify? I'm having trouble replicating on Restify.

thierryskoda commented 7 years ago

No simple Express server

carvalhoviniciusluiz commented 6 years ago

i'm having trouble with resify too.