ZeroCN

Constant exposing environment variables.

Usage

Install package

pnpm dlx shadcn@latest add https://zerocn.zeroopensource.org/r/env.json

Install package (workspace)

pnpm --filter=$WORKSPACE shadcn add https://zerocn.zeroopensource.org/r/env.json

Import 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

Misc

On this page