Browse Source

redis pswd

release_0.0.2
巴林闲侠 3 years ago
parent
commit
4e192fe454
  1. 4
      code/VideoAccess-VCMP/api/app/lib/service/redis.js

4
code/VideoAccess-VCMP/api/app/lib/service/redis.js

@ -3,7 +3,9 @@
const redis = require("ioredis")
module.exports = async function factory (app, opts) {
let client = new redis(opts.redis.port, opts.redis.host);
let client = new redis(opts.redis.port, opts.redis.host, {
password: opts.redis.pwd,
});
client.on("error", function (err) {
app.fs.logger.error('info', '[FS-AUTH-REDIS]', `redis connect error. ${opts.redis.host + ':' + opts.redis.port}`);

Loading…
Cancel
Save