moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 508 forks source link

Support for redis:url configuration #571

Closed thom4parisot closed 7 years ago

thom4parisot commented 7 years ago

Hello and thanks for your project :-)

I see in the advanced usage there is no way to connect to redis via the url option. Likewise mongo driver, it is very handy to configure everything at once, like redis://user@host:port/db. Cf. redis options

Is there any chance to support this form?

It would make the settings look like this:

var pubsubsettings = {
    type: 'redis',
    redis: require('redis'),
    url: process.env.REDIS_URL,
    return_buffers: true
};
mcollina commented 7 years ago

Is there any chance to support this form?

Yes, send a pull request! :)