Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update presets.ts #288

Merged
merged 12 commits into from
Jan 25, 2025
26 changes: 26 additions & 0 deletions packages/core/src/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,32 @@ export const vercel = () =>
runtimeEnv: process.env,
});

/**
* Neon for Vercel Environment Variables
* @see https://neon.tech/docs/guides/vercel-native-integration#environment-variables-set-by-the-integration
*/
export const neon_vercel = () =>
createEnv({
server: {
DATABASE_URL: z.string(),
DATABASE_URL_UNPOOLED: z.string().optional(),
PGHOST: z.string().optional(),
PGHOST_UNPOOLED: z.string().optional(),
PGUSER: z.string().optional(),
PGDATABASE: z.string().optional(),
PGPASSWORD: z.string().optional(),
POSTGRES_URL: z.string().url().optional(),
POSTGRES_URL_NON_POOLING: z.string().url().optional(),
POSTGRES_USER: z.string().optional(),
POSTGRES_HOST: z.string().optional(),
POSTGRES_PASSWORD: z.string().optional(),
POSTGRES_DATABASE: z.string().optional(),
POSTGRES_URL_NO_SSL: z.string().url().optional(),
POSTGRES_PRISMA_URL: z.string().url().optional(),
},
runtimeEnv: process.env,
});

/**
* @see https://docs.uploadthing.com/getting-started/appdir#add-env-variables
*/
Expand Down
Loading