Spaces:
Sleeping
Sleeping
Download create-env.js from srijan9994/node-ui: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/spaces/srijan9994/node-ui/resolve/main/create-env.js
- Command line
-
hf download hf://spaces/srijan9994/node-ui/create-env.js
-
curl -L -o create-env.js https://huggingface.co/spaces/srijan9994/node-ui/resolve/main/create-env.js
642 Bytes
| const fs = require('fs'); | |
| // Log the environment variables | |
| console.log('REACT_APP_GOOGLE_CLIENT_ID:', process.env.REACT_APP_GOOGLE_CLIENT_ID); | |
| console.log('REACT_APP_FLASK_API_URL:', process.env.REACT_APP_FLASK_API_URL); | |
| // Construct the content of the .env file | |
| const envContent = ` | |
| REACT_APP_GOOGLE_CLIENT_ID=${process.env.REACT_APP_GOOGLE_CLIENT_ID} | |
| REACT_APP_FLASK_API_URL=${process.env.REACT_APP_FLASK_API_URL} | |
| `; | |
| // Write the content to the .env file | |
| fs.writeFileSync('.env', envContent, (err) => { | |
| if (err) { | |
| console.error('Error writing .env file', err); | |
| } else { | |
| console.log('.env file created successfully'); | |
| } | |
| }); | |