mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add redis client
This commit is contained in:
parent
b6cc41967e
commit
3f3300da81
1 changed files with 11 additions and 0 deletions
11
packages/text-to-speech/src/redis.ts
Normal file
11
packages/text-to-speech/src/redis.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { createClient } from 'redis'
|
||||
|
||||
export const createRedisClient = async () => {
|
||||
const redisClient = createClient({ url: process.env.REDIS_URL })
|
||||
|
||||
redisClient.on('error', (err) => console.error('Redis Client Error', err))
|
||||
|
||||
await redisClient.connect()
|
||||
|
||||
return redisClient
|
||||
}
|
||||
Loading…
Reference in a new issue