ragulka / sails-starter-app

Sails starter app
154 stars 44 forks source link

How to expose kue UI #5

Closed anabelle closed 10 years ago

anabelle commented 10 years ago

Hi, do you think is possible to show the KUE UI inside a sails app? Maybe as a mounted app?

kithokit commented 10 years ago

Hi @anabelle, Are you able to show the KUE UI inside a sails app now? I still can't find the solution

anabelle commented 10 years ago

Hi @kithokit I managed to do it by mounting it in a different port:

https://github.com/8manos/colaborativo.js/blob/master/api/services/JobsKue.js#L29

anabelle commented 10 years ago

You can see it working here: http://beta.colaborativo.co/kue/active

anabelle commented 10 years ago

This custom middleware setting is also relevant: https://github.com/8manos/colaborativo.js/blob/master/config/express.js#L78

kithokit commented 10 years ago

Hi anabelle, afaik, the config/express.js is deprecated in Sails.js v10

kithokit commented 10 years ago

in V10, we use config/http.js

module.exports.http = { customMiddleware: function (app) {

    var kue = require('kue');
    app.use('/tools/queue', kue.app);
 }

}

tobalsgithub commented 9 years ago

BTW, I keep seeing this example posted in different places. For me, app.use('/tools/queue', kue.app); does not work. But app.use('/tools/queue/', kue.app); // note the trailing slash works perfect.