feat(create-turbo): create https://github.com/juliusmarminge/acme-corp
This commit is contained in:
19
packages/api/src/env.mjs
Normal file
19
packages/api/src/env.mjs
Normal file
@@ -0,0 +1,19 @@
|
||||
import { createEnv } from "@t3-oss/env-nextjs";
|
||||
import * as z from "zod";
|
||||
|
||||
export const env = createEnv({
|
||||
shared: {},
|
||||
server: {
|
||||
NEXTJS_URL: z.preprocess(
|
||||
(str) =>
|
||||
process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : str,
|
||||
process.env.VERCEL_URL ? z.string().min(1) : z.string().url(),
|
||||
),
|
||||
},
|
||||
// Client side variables gets destructured here due to Next.js static analysis
|
||||
// Shared ones are also included here for good measure since the behavior has been inconsistent
|
||||
experimental__runtimeEnv: {},
|
||||
skipValidation:
|
||||
!!process.env.SKIP_ENV_VALIDATION ||
|
||||
process.env.npm_lifecycle_event === "lint",
|
||||
});
|
||||
Reference in New Issue
Block a user