From d8e21e8b7b111999f13d58974e13d5471845f7b9 Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Sat, 27 Jan 2024 14:26:20 -0600 Subject: [PATCH] Cache Image Counter & page gen time --- index.js | 1 + resources/mainPage.html | 2 ++ 2 files changed, 3 insertions(+) diff --git a/index.js b/index.js index 4349d17..68bd76d 100644 --- a/index.js +++ b/index.js @@ -367,6 +367,7 @@ async function pageUpdate() { html = html.replace("{UPTIME}", gameTimeFormatter((Date.now() - uptime) / 1000) + ' ago') html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago') html = html.replace("{QUOTE_COUNT}", randomQuotes.length) + html = html.replace("{CACHED_IMAGES}", fs.readdirSync(path.join(staticpath, 'cached')).length) html = html.replace("{GENERATION_TIME}", Math.ceil(Date.now() - genStart).toString() + 'ms') diff --git a/resources/mainPage.html b/resources/mainPage.html index 9ab0e39..b99257a 100644 --- a/resources/mainPage.html +++ b/resources/mainPage.html @@ -65,6 +65,8 @@
  • Uptime: {UPTIME}
  • Last Lanyard Update: {LAST_LANYARD}
  • Quotes: {QUOTE_COUNT}
  • +
  • Images Cached: {CACHED_IMAGES}
  • +
  • Page Generation Time: {GENERATION_TIME}
  • {SOCIALS}