import { createClient } from 'redis';

export const createRedisClient = async (config) => {
  const client = createClient({
    socket: {
      host: config.host,
      port: config.port
    },
    password: config.password,
    database: config.db
  });
  await client.connect();
  return client;
};
