import { createClient } from 'redis';
import { captureException } from '../../utils/sentry';
export const redisConnectionMiddleware = async (request, response, next) => {
try {
const redisClient = createClient();
await redisClient.connect();
request.redisClient = redisClient;
next();
} catch (error) {
captureException(error);
next();
}
};