22 lines
949 B
JavaScript
22 lines
949 B
JavaScript
const fs = require('fs');
|
|
|
|
// Supabase credentials
|
|
const supabaseUrl = 'https://avfoewfplaplaejjhiiv.supabase.co';
|
|
const supabaseKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImF2Zm9ld2ZwbGFwbGFlampoaWl2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTAyNjM2NDUsImV4cCI6MjA2NTgzOTY0NX0._46bKpp95xLN6tkCPRCVNeVBSO-QyvOBPw-jTb74_0o';
|
|
|
|
// Generate a secure JWT secret (you should change this in production)
|
|
const jwtSecret = 'your-super-secret-jwt-key-change-this-in-production-' + Math.random().toString(36).substring(2, 15);
|
|
|
|
// Create .env.local content
|
|
const envContent = `NEXT_PUBLIC_SUPABASE_URL=${supabaseUrl}
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY=${supabaseKey}
|
|
JWT_SECRET=${jwtSecret}
|
|
`;
|
|
|
|
// Write to file
|
|
fs.writeFileSync('.env.local', envContent);
|
|
|
|
console.log('✅ Environment file created successfully!');
|
|
console.log('📝 Please review and update the JWT_SECRET in production.');
|
|
console.log('Content:');
|
|
console.log(envContent);
|