Spaces:
Runtime error
Runtime error
Download server/src/env.ts from Nryn215/FreeLLMAPI: direct link, hf CLI and curl.
- Browser
- Download file 453 Bytes
-
https://huggingface.co/spaces/Nryn215/FreeLLMAPI/resolve/main/server/src/env.ts
- Command line
-
hf download hf://spaces/Nryn215/FreeLLMAPI/server/src/env.ts
-
curl -L -o env.ts https://huggingface.co/spaces/Nryn215/FreeLLMAPI/resolve/main/server/src/env.ts
453 Bytes
| import dotenv from 'dotenv'; | |
| import path from 'path'; | |
| import { fileURLToPath } from 'url'; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| // FREEAPI_ENV_PATH lets embedders (e.g. the desktop app, where __dirname sits | |
| // inside a bundle) point at an explicit .env — or at nothing: dotenv silently | |
| // no-ops on a missing file either way. | |
| dotenv.config({ path: process.env.FREEAPI_ENV_PATH ?? path.resolve(__dirname, '../../.env') }); | |