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

View File

@ -39,6 +39,7 @@
"escape-html": "1.0.3",
"google-auth-library": "8.9.0",
"ky": "1.2.4",
"ioredis": "5.4.1",
"minio": "7.1.3",
"posthog-node": "3.1.1",
"remark-parse": "11.0.0",

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