2
0

Add attachments option to text input (#1608)

Closes #854
This commit is contained in:
Baptiste Arnaud
2024-06-26 10:13:38 +02:00
committed by GitHub
parent 80da7af4f1
commit 6db0464fd7
88 changed files with 2959 additions and 735 deletions

16
packages/lib/redis.ts Normal file
View File

@@ -0,0 +1,16 @@
import { env } from '@typebot.io/env'
import Redis from 'ioredis'
declare const global: { redis: Redis | undefined }
let redis: Redis | undefined
if (env.NODE_ENV === 'production' && !process.versions.bun && env.REDIS_URL) {
redis = new Redis(env.REDIS_URL)
} else if (env.REDIS_URL) {
if (!global.redis) {
global.redis = new Redis(env.REDIS_URL)
}
redis = global.redis
}
export default redis