Constant exposing environment variables.
Usage
Install package
pnpm dlx shadcn@latest add https://zerocn.zeroopensource.org/r/env.jsonInstall package (workspace)
pnpm --filter=$WORKSPACE shadcn add https://zerocn.zeroopensource.org/r/env.jsonImport and use
import { ENV } from '@/lib/env'
console.log(ENV.NODE_ENV)For Next.js
import { NEXTENV } from '@/lib/next-env'
console.log(NEXTENV.NODE_ENV)References
- Build a documented / type-safe API with hono, drizzle, zod, OpenAPI and scalar
- https://github.com/w3cj/hono-open-api-starter