ext-modular/redisclient.js

16 lines
364 B
JavaScript

const cl = global.botanLoader;
const Dragonfly = global.Dragonfly;
const Redis = require( "redis" );
const SessConf = cl.load( "config.all" ).sx.modular.session;
var Client = Redis.createClient({
"legacyMode": true
, "url": `redis://${SessConf.config.host}:${SessConf.config.port}/${SessConf.config.database}`
});
Client.connect();
module.exports = Client;