MCPcopy Create free account
hub / github.com/hashintel/hash / loadServerEnv

Function loadServerEnv

apps/petrinaut-website/vite.config.ts:12–20  ·  view source on GitHub ↗
(mode: string)

Source from the content-addressed store, hash-verified

10const appRoot = fileURLToPath(new URL(".", import.meta.url));
11
12const loadServerEnv = (mode: string) => {
13 const env = loadEnv(mode, appRoot, "");
14
15 for (const [key, value] of Object.entries(env)) {
16 if (process.env[key] === undefined) {
17 process.env[key] = value;
18 }
19 }
20};
21
22// Plugin required to serve the chat endpoint in dev.
23// In production, it will be bundled and served by Vercel.

Callers 1

vite.config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected