Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

349 B
Raw Blame
import { createClient } from '@redis/client';

import { config } from '@colanode/server/lib/config';

export const redis = createClient({
  url: config.redis.url,
  database: config.redis.db,
});

export const initRedis = async () => {
  await redis.connect();

  redis.on('error', (err) => {
    console.error('Redis client error:', err);
  });
};