Spaces:
Sleeping
Sleeping
| 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'); | |
| } | |
| }); | |