S1 Backend usesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/PDNMX/s1_backend/llms.txt
Use this file to discover all available pages before exploring further.
dotenv to load environment variables from a .env file at startup. Only one environment variable is required to run the server; all provider OAuth credentials are stored separately in endpoints.json and are never placed in .env. This separation keeps sensitive credentials out of process environment listings while still allowing easy per-environment configuration.
Supported Variables
The TCP port the HTTP server listens on. Defined in
bin/www as process.env.PORT || '3000'. The provided .env.example sets this to 3101, which is the conventional port used across the PDN DEMOS deployment.Setting Up .env
Copy the example file
The repository ships a
.env.example that contains every supported variable with safe default values. Copy it to create your local configuration file:Docker and Environment Variables
When running S1 Backend with Docker Compose, the${PORT} placeholder in docker-compose.yml is resolved from the shell environment or a .env file located next to docker-compose.yml at Docker Compose runtime — not from the .env file inside the project that dotenv reads at Node.js startup.
docker-compose.yml (port mapping excerpt)
.env file from the directory where docker-compose.yml lives, so placing PORT=3101 there means you do not need to prefix every docker-compose command with the variable.
The same
.env file that Docker Compose reads for variable substitution is also picked up by dotenv inside the Node.js process when the container starts, because bin/www calls require('dotenv').config() unconditionally. A single .env file therefore configures both layers.Provider Credentials
OAuth credentials for each PDN data provider — includingusername, password, client_id, client_secret, and token_url — are stored in endpoints.json, not in .env. Keeping credentials out of environment variables prevents them from appearing in process listings, Docker inspect output, or CI logs.
See Configuration for the full endpoints.json schema, including all required fields and an annotated example.