Spaces:
Configuration error
Configuration error
Download scripts/check-env.js from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 623 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/scripts/check-env.js
- Command line
-
hf download hf://spaces/SreejithSHR/umami/scripts/check-env.js
-
curl -L -o check-env.js https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/scripts/check-env.js
623 Bytes
| /* eslint-disable no-console */ | |
| require('dotenv').config(); | |
| function checkMissing(vars) { | |
| const missing = vars.reduce((arr, key) => { | |
| if (!process.env[key]) { | |
| arr.push(key); | |
| } | |
| return arr; | |
| }, []); | |
| if (missing.length) { | |
| console.log(`The following environment variables are not defined:`); | |
| for (const item of missing) { | |
| console.log(' - ', item); | |
| } | |
| process.exit(1); | |
| } | |
| } | |
| if (!process.env.SKIP_DB_CHECK && !process.env.DATABASE_TYPE) { | |
| checkMissing(['DATABASE_URL']); | |
| } | |
| if (process.env.CLOUD_MODE) { | |
| checkMissing(['CLOUD_URL', 'KAFKA_BROKER', 'KAFKA_URL', 'REDIS_URL']); | |
| } | |