this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 31 lines 1.1 kB view raw
1import { createEnv } from "@t3-oss/env-core"; 2import * as v from "valibot"; 3 4export const env = createEnv({ 5 server: { 6 DATABASE_URL: v.pipe(v.string(), v.url(), v.minLength(1)), 7 ELECTRIC_SOURCE: v.pipe(v.string(), v.minLength(1)), 8 ELECTRIC_SECRET: v.pipe(v.string(), v.minLength(1)), 9 }, 10 11 /** 12 * What object holds the environment variables at runtime. This is usually 13 * `process.env` or `import.meta.env`. 14 */ 15 runtimeEnv: process.env, 16 17 /** 18 * By default, this library will feed the environment variables directly to 19 * the Zod validator. 20 * 21 * This means that if you have an empty string for a value that is supposed 22 * to be a number (e.g. `PORT=` in a ".env" file), Zod will incorrectly flag 23 * it as a type mismatch violation. Additionally, if you have an empty string 24 * for a value that is supposed to be a string with a default value (e.g. 25 * `DOMAIN=` in an ".env" file), the default value will never be applied. 26 * 27 * In order to solve these issues, we recommend that all new projects 28 * explicitly specify this option as true. 29 */ 30 emptyStringAsUndefined: true, 31});