update .env writing
This commit is contained in:
14
electron-app/scripts/create-env.cjs
Normal file
14
electron-app/scripts/create-env.cjs
Normal file
@@ -0,0 +1,14 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const envPath = path.join(__dirname, '..', '.env');
|
||||
|
||||
const content = `WS_URL=${process.env.WS_URL || ''}
|
||||
API_URL=${process.env.API_URL || ''}
|
||||
NODE_ENV=production
|
||||
`;
|
||||
|
||||
fs.writeFileSync(envPath, content, 'utf8');
|
||||
console.log('.env file created at:', envPath);
|
||||
console.log('Contents:');
|
||||
console.log(content);
|
||||
Reference in New Issue
Block a user