Necesito ayuda:
Guardé el ping de mi bot de Discord en un archivo JSON y quiero mostrar el ping del archivo JSON en mi servidor web usando HTML. Estoy usando Express.js.
Esta es una imagen de los datos, pero no se actualiza cuando cambia en el archivo JSON.

Esto en mi proyecto expreso:
app.get('/', function(req, res){ const pingsBots = require('./Database/BotPing.json') const pingofbot = pingsBots.thepingofbot.botping let file = fs.readFileSync(path.join(__dirname, './html/', 'main.html'), { encoding: 'utf-8' }) file = file.replace("$$theping$$", pingofbot) res.sendFile(path.join(__dirname, './html/', 'main.html')) res.send(file) })Y esto en método listo en mi bot:
setInterval(function(){ let Pusher = JSON.parse(fs.readFileSync('./Database/BotsPing.json', 'utf8')); Pusher["thepingofbot"] = { botping: `${client.ws.ping}` } async function SavePingData(path, JSONdata){ fs.writeFileSync(path, JSON.stringify(JSONdata, null, 2)) } SavePingData('./Database/BotsPing.json', Pusher) }, 1000)Por cierto: proyecto Express no con el proyecto bot.
app.get('/', function(req, res){ const pingsBots = require('./Database/BotPing.json') const pingofbot = pingsBots.thepingofbot.botping let file = fs.readFileSync(path.join(__dirname, './html/', 'main.html'), { encoding: 'utf-8' }) file = file.replace("$$theping$$", pingofbot) res.sendFile(path.join(__dirname, './html/', 'main.html')) })