This commit is contained in:
2026-05-26 17:16:51 +05:00
parent f0eb7fb1ea
commit 244a409444
2 changed files with 27 additions and 22 deletions

View File

@@ -131,7 +131,10 @@ app.delete('/api/leads/:id', (req, res) => {
// Serve frontend
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'index.html'));
const years = new Date().getFullYear() - 2011;
const htmlPath = path.join(__dirname, 'public', 'index.html');
const html = fs.readFileSync(htmlPath, 'utf8');
res.send(html.replace(/\{years\}/g, String(years)));
});
app.listen(PORT, async () => {