Load env vars before server config init (#2586)

## Summary
- load dotenv before constructing the server config so .env values are
available
- avoid misconfigured tunnels/host metadata when env vars were
previously undefined

## Testing
- npm test -- --runInBand
This commit is contained in:
Ahmet Dedeler
2025-12-10 03:10:53 +03:00
committed by GitHub
parent 5e95ba8da5
commit 18efa4cd73
+2 -2
View File
@@ -6,9 +6,9 @@ import { Cloudflare, TunnelConfig } from "./Cloudflare";
import { startMaster } from "./Master";
import { startWorker } from "./Worker";
const config = getServerConfigFromServer();
// Load environment variables before we read configuration values derived from them.
dotenv.config();
const config = getServerConfigFromServer();
// Main entry point of the application
async function main() {