🧑💻 Improve env variables type safety and management (#718)
Closes #679
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
"@rollup/plugin-terser": "0.4.3",
|
||||
"@rollup/plugin-typescript": "11.1.2",
|
||||
"@typebot.io/lib": "workspace:*",
|
||||
"@typebot.io/env": "workspace:*",
|
||||
"@typebot.io/schemas": "workspace:*",
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"autoprefixer": "10.4.14",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { env } from '@typebot.io/lib'
|
||||
import { env } from '@typebot.io/env'
|
||||
|
||||
const cloudViewerUrl = 'https://viewer.typebot.io'
|
||||
|
||||
export const guessApiHost = () =>
|
||||
env('VIEWER_INTERNAL_URL') ??
|
||||
env('VIEWER_URL')?.split(',')[0] ??
|
||||
env.NEXT_PUBLIC_VIEWER_INTERNAL_URL ??
|
||||
env.NEXT_PUBLIC_VIEWER_URL[0] ??
|
||||
cloudViewerUrl
|
||||
|
@ -1 +0,0 @@
|
||||
DATABASE_URL=postgresql://postgres:typebot@localhost:5432/typebot
|
Reference in New Issue
Block a user