require('dotenv').config();
const fs = require('fs');
const path = require('path');
const indexPath = path.join('/usr/share/nginx/html', 'index.html');
if (!fs.existsSync(indexPath)) {
console.error(`Error: File not found at ${indexPath}`);
return;
}
let indexContent = fs.readFileSync(indexPath, 'utf8');
if (process.env.ENVIRONMENT === 'production') {
const metatags = `
`;
indexContent = indexContent.replace('', metatags);
}
fs.writeFileSync(indexPath, indexContent, 'utf8');