sliders-upConfig & Env Vars

Prax uses environment variables to manage configuration for:

  • LLM providers (OpenAI, Azure, etc.)

  • Databases (Postgres, SQLite)

  • Redis or memory backends

  • Feature toggles (auth, logging)


Setup

Create a .env file in the root of the project:

bashCopyEditcp .env.example .env

Common Environment Variables

envCopyEdit# API Keys
OPENAI_API_KEY=sk-...

# Database
DATABASE_URL=postgres://user:pass@host:5432/db

# Optional Features
ENABLE_AUTH=true
LOG_LEVEL=debug

# Server Settings
PORT=3001
FRONTEND_URL=http://localhost:3000

Backend Access

Env vars are read using process.env:


Frontend Access

Frontend variables must be prefixed with VITE_ (if using Vite):

Accessed with:

Last updated