backend/utils/redis.js

14 lines
320 B
JavaScript
Raw Normal View History

2023-03-03 16:44:40 +00:00
const Redis = require('ioredis')
const logger = require("./logger.js")
const redis = new Redis({
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
password: process.env.REDIS_PASS,
});
redis.on('ready', function () {
logger.info({ message: 'Connected to redis!' })
});
module.exports = redis