fix pixel

This commit is contained in:
Cory Sanin 2025-08-14 01:15:25 -05:00
parent 23a1ebca32
commit cde31976f4

View File

@ -53,7 +53,7 @@ app.get('/favicon.ico', (_, res) => {
const sendPixel = (_: express.Request, res: express.Response) => { const sendPixel = (_: express.Request, res: express.Response) => {
res.set('Cache-Control', 'private, max-age=31557600'); // one year res.set('Cache-Control', 'private, max-age=31557600'); // one year
visitCount++; visitCount++;
res.sendFile(Path.join(import.meta.dirname, 'assets', 'images', 'webp', 'cache-me.webp')); res.sendFile(Path.resolve(import.meta.dirname, '..', 'assets', 'images', 'webp', 'cache-me.webp'));
} }
app.get('/cache-me.webp', sendPixel); app.get('/cache-me.webp', sendPixel);
@ -80,4 +80,4 @@ process.on('SIGTERM', async () => {
await saveVisits(); await saveVisits();
console.log('done. shutting down...'); console.log('done. shutting down...');
webserver.close(); webserver.close();
}); });