cardserver
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -11,3 +11,2 @@ #!/usr/bin/env node | ||
const maxage = 60 * 60 * 24 * 7 | ||
const storage = '/tmp/cards' | ||
@@ -18,3 +17,3 @@ const card = async (req, res) => { | ||
const imagePath = `${storage}/${host}/${req.params[0]}.png` | ||
const imagePath = `/tmp/cards/${host}/${req.params[0].replace('cards/', '')}.png` | ||
const imageExpired = !fs.existsSync(imagePath) || Date.parse(fs.statSync(imagePath).mtime) < new Date - maxage * 1000 | ||
@@ -21,0 +20,0 @@ |
{ | ||
"name": "cardserver", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "A simple social media card renderer written using Puppeteer – screenshot card-like webpages on-the-fly", | ||
@@ -5,0 +5,0 @@ "main": "cardserver.js", |
7494
49