MCPcopy Create free account
hub / github.com/pollinations/pollinations / loadEnvFile

Function loadEnvFile

apps/_scripts/deploy-app.js:23–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21const UPSTREAM_ZONE = "myceli.ai";
22
23function loadEnvFile() {
24 const envPath = path.join(__dirname, "../.env");
25 if (!fs.existsSync(envPath)) return;
26
27 for (const line of fs.readFileSync(envPath, "utf8").split("\n")) {
28 const match = line.match(/^([A-Z0-9_]+)=(.*)$/);
29 if (match && !process.env[match[1]]) {
30 process.env[match[1]] = match[2].trim();
31 }
32 }
33}
34
35function loadCredentials() {
36 loadEnvFile();

Callers 1

loadCredentialsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected