quetre/utils/redis.js

13 lines
319 B
JavaScript

/* eslint-disable no-unused-vars */
import Redis from 'ioredis';
const redisUrl = process.env.REDIS_URL;
const stub = {
get: async key => {},
set: async (key, value, secondsToken, seconds) => {},
expire: async (key, seconds) => {},
};
const redis = redisUrl ? new Redis(redisUrl) : stub;
export default redis;