2 Commits

  1. 2
      .gitignore
  2. 10
      server-pages.csv
  3. 8
      server-status.js

2
.gitignore

@ -1,4 +1,4 @@
server-pages-test.csv
server-pages-*.csv
# npm {{{ -

10
server-pages.csv

@ -1,11 +1,5 @@
shortUrl,url,siteTitle,description,repo,repoUrl
cal.khkm.tk,https://cal.khkm.tk,"Baïkal server","CalDAV/CardDAV server.",sabre-io/Baikal,https://github.com/sabre-io/Baikal
git.kevin-mok.com,https://git.kevin-mok.com,"Kevin Mok's Gitea","Git server.",go-gitea/gitea,https://github.com/go-gitea/gitea
img.khkm.tk,https://img.khkm.tk,"Kevin's Images","Image hosting.",LycheeOrg/Lychee,https://github.com/LycheeOrg/Lychee/
kevin-mok.com,https://kevin-mok.com," Kevin Mok ","Personal site (this site).",Kevin-Mok/my-site,https://git.kevin-mok.com/Kevin-Mok/my-site
matrix.ataraxy.tk,https://matrix.ataraxy.tk/.well-known/matrix/server,,"Matrix chat server. Only accessible through Riot client.",matrix-org/synapse,https://github.com/matrix-org/synapse
mnpd.gq,https://mnpd.gq/test,"test","Minimalistic live notepad.",pereorga/minimalist-web-notepad,https://github.com/pereorga/minimalist-web-notepad
pste.gq,https://pste.gq,"hastebin","Pastebin.",seejohnrun/haste-server,https://github.com/seejohnrun/haste-server
smol.gq,https://smol.gq,"Kevin's URL Shortener","URL shortener.",132ikl/liteshort,https://github.com/132ikl/liteshort
taskd.khkm.tk,taskd.khkm.tk:53589,,"Taskwarrior (task manager) server. No web interface.",GothenburgBitFactory/taskserver,https://github.com/GothenburgBitFactory/taskserver
wthr.ml,https://wthr.ml/,," <code>curl</code>-friendly, local weather info. <a href="https://regexr.com/4mgna" target="_blank"><code>\/m?t?v?</code></a> are all valid endings.",Kevin-Mok/weather,https://git.kevin-mok.com/Kevin-Mok/weather
short.khkm.dev,https://short.khkm.dev,"liteshort","URL shortener.",132ikl/liteshort,https://github.com/132ikl/liteshort
paste.khkm.dev,https://paste.khkm.dev,"Paste a password, confidential message, or private data.","Pastebin.",HemmeligOrg/Hemmelig.app,https://github.com/HemmeligOrg/Hemmelig.app

8
server-status.js

@ -9,6 +9,8 @@ const csvFilePath = 'server-pages.csv'
// consider webpage to be up if stored title matches fetched title
const checkIfTitleMatches = obj => {
// console.log(obj['url'])
// console.log(urlMetadata(obj['url']))
return urlMetadata(obj['url']).then(metadata => { // success handler
// log(metadata.title, obj['siteTitle'])
if (metadata.title == obj['siteTitle']) {
@ -16,10 +18,14 @@ const checkIfTitleMatches = obj => {
} else {
obj['status'] = 'down'
}
return true
// return true
},
error => { // failure handler
console.log(error)
obj['status'] = 'down'
// return false
}).catch(function(err) {
console.log(err);
})
}

Loading…
Cancel
Save