2023-04-18 03:06:37 +00:00
|
|
|
import { createClient } from 'redis';
|
2023-04-18 01:49:20 +00:00
|
|
|
|
|
|
|
// Create a new Redis client
|
2023-04-18 03:06:37 +00:00
|
|
|
const client = createClient({
|
|
|
|
url: 'redis://gwei-bot-redis:6379'
|
2023-04-18 01:49:20 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// Log any Redis errors to the console
|
|
|
|
client.on('error', (error) => {
|
2023-04-18 03:06:37 +00:00
|
|
|
console.error('Redis Client Error', error);
|
2023-04-18 01:49:20 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// Export the Redis client
|
|
|
|
export default client;
|