Skip to main content
Important: Findable does not use a .env file in production. All configuration is managed through Azure App Service → Configuration → Application Settings. The .env file is strictly for local development.

Single-Port Deployment

In production, the application serves both the React frontend and Node.js backend from a single Express server on a single port:
# Build everything
npm run build

# Start production server
npm start  # or: node dist/index.js
PM2 is used as the process manager (see ecosystem.config.js).

Azure App Service Configuration

Set the Cosmos DB connection variables (see Setup Wizard → Prerequisites) as Application Settings in Azure App Service → Configuration. Do not use a .env file in production. All other application settings (AI model endpoints, search endpoints, feature flags, auth config, etc.) are stored in the Cosmos DB settings container and managed through the Admin UI. This means:
  • No secrets in source control — Cosmos DB connection is the only environment-level config
  • Runtime configuration — Admins can change settings without redeployment
  • Centralized management — All settings visible and editable through the Admin interface
For production, use Azure Managed System Identity instead of API keys:
  1. Enable system-assigned managed identity on your App Service
  2. Grant the identity access to Cosmos DB, Azure AI Search, Storage, etc.
  3. Set AZURE_COSMOS_AUTH_TYPE=managedSystemIdentity
  4. Omit AZURE_COSMOS_KEY — the managed identity handles authentication

Environment Variables Reference

These are the environment variables recognized by the server. In production, set them as Azure App Service → Configuration → Application Settings. For local development, use a .env file in the project root. Required (Cosmos DB connection):
VariableDescription
AZURE_COSMOS_ENDPOINTCosmos DB account endpoint URL
AZURE_COSMOS_KEYCosmos DB account key (omit when using managed identity)
AZURE_COSMOS_DBCosmos DB database name
AZURE_COSMOS_AUTH_TYPEapiKey (default) or managedSystemIdentity
Optional (overrides for settings normally stored in Cosmos DB):
VariableDescription
TENANT_IDAzure AD tenant ID
GRAPH_CLIENT_IDServer app registration client ID
GRAPH_CLIENT_SECRETServer app registration client secret
GRAPH_AUTH_TYPEclientCredentials (default) or managedSystemIdentity
SHAREPOINT_CLIENT_IDSharePoint app registration client ID
SHAREPOINT_CLIENT_SECRETSharePoint app registration client secret
PORTServer listen port (default: 3000 in dev, 8080 in production)
LOG_LEVELWinston log level: error, warn, info (default), debug
FINDABLE_BASE_URLPublic URL for notification links (e.g., https://your-app.azurewebsites.net)
NODE_ENVdevelopment or production
Reminder: Environment variables take precedence over Cosmos DB values when present. Most settings should be managed through the Admin UI — use environment variables only for bootstrapping and infrastructure-level configuration.