chore: automated housekeeping...
This commit is contained in:
parent
14b2799f08
commit
4add2d1aff
151 changed files with 4561 additions and 3315 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue