Spaces:
Configuration error
Configuration error
Download scripts/update-tracker.js from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 445 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/scripts/update-tracker.js
- Command line
-
hf download hf://spaces/SreejithSHR/umami/scripts/update-tracker.js
-
curl -L -o update-tracker.js https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/scripts/update-tracker.js
445 Bytes
| /* eslint-disable no-console */ | |
| require('dotenv').config(); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const endPoint = process.env.COLLECT_API_ENDPOINT; | |
| if (endPoint) { | |
| const file = path.resolve(__dirname, '../public/script.js'); | |
| const tracker = fs.readFileSync(file); | |
| fs.writeFileSync(path.resolve(file), tracker.toString().replace(/\/api\/send/g, endPoint)); | |
| console.log(`Updated tracker endpoint: ${endPoint}.`); | |
| } | |