chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-07-21 10:52:51 +02:00
parent 14b2799f08
commit 4add2d1aff
151 changed files with 4561 additions and 3315 deletions

View file

@ -54,16 +54,18 @@ class ServerLdScrape extends Script {
const start = new Date()
const cache: Record<string, { date: Date; contents: any }> = {}
new Server(port, {}, [
{mustMatch: "status",
mimetype: "application/json",
handle: async () => {
return JSON.stringify({
online: true,
cached_entries: Object.keys(cache).length,
booted: start,
uptime: Math.floor((new Date().getTime() - start.getTime()) / 1000)
})
}},
{
mustMatch: "status",
mimetype: "application/json",
handle: async () => {
return JSON.stringify({
online: true,
cached_entries: Object.keys(cache).length,
booted: start,
uptime: Math.floor((new Date().getTime() - start.getTime()) / 1000),
})
},
},
{
mustMatch: "extractgraph",
mimetype: "application/ld+json",