questionnaire docs
Getting Started

Environment Variables

Required and optional environment variables for local development.

Environment Variables

Required

VariablePurposeExample
MONGODB_URIMongoDB connection stringmongodb://localhost:27017/questionnaire

Development (localhost)

VariablePurposeDefault
DEV_TENANT_DOMAINDomain used to look up tenant on localhostgetbestanswers.com
DEV_TENANT_IDFallback tenant lookup by ID if domain fails

How tenant resolution works on localhost

Tenant-specific config (in MongoDB, not env)

These are stored on the Tenant document, not in .env:

  • adConfig — GAM network code, ad units, KV values, AdSense publisher ID
  • pixelConfig — Google/Meta pixel IDs, conversion IDs
  • taboolaConfig — Taboola publisher ID, widget placement
  • pushAlertConfig — Push notification scripts

See Data Models for the full schema.

On this page