summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-10-18 19:37:10 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-10-18 19:37:10 +0200
commit9143f71155c25ec37b329d67c52f109464be6695 (patch)
tree8dd9f5cd825df6c8fc8b3a026899bbff0b7cbff3
parent7f3fc6eb55aef96411bf8b4edb42b54a65784bf8 (diff)
Whatpulse hasn't worked for YEARS
-rwxr-xr-xwebserver.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/webserver.js b/webserver.js
index 4b49412..3405431 100755
--- a/webserver.js
+++ b/webserver.js
@@ -27,24 +27,24 @@ const io = socketio(httpServer);
// const reqlogger = new Logger("request_log.txt");
-const whatpulse = {"keys": "<??>", "clicks": "<??>"};
-function refreshWhatpulse() {
- const url = "http://api.whatpulse.org/user.php?user=tomsmeding&format=json&formatted=yes";
- http.get(url, function (res) {
- let body = "";
- res.on("data", function (data) { body += data; });
- res.on("end", function () {
- try { body = JSON.parse(body); }
- catch (e) { return; }
- whatpulse.keys = body.Keys/*.replace(/,/g, "&nbsp;")*/;
- whatpulse.clicks = body.Clicks/*.replace(/,/g, "&nbsp;")*/;
- });
- }).on("error", function (err) {
- console.log(`Whatpulse request error: ${err.message}`);
- });
-}
-setInterval(refreshWhatpulse, 6*3600*1000); //every 6 hours
-refreshWhatpulse();
+// const whatpulse = {"keys": "<??>", "clicks": "<??>"};
+// function refreshWhatpulse() {
+// const url = "http://api.whatpulse.org/user.php?user=tomsmeding&format=json&formatted=yes";
+// http.get(url, function (res) {
+// let body = "";
+// res.on("data", function (data) { body += data; });
+// res.on("end", function () {
+// try { body = JSON.parse(body); }
+// catch (e) { return; }
+// whatpulse.keys = body.Keys[>.replace(/,/g, "&nbsp;")<];
+// whatpulse.clicks = body.Clicks[>.replace(/,/g, "&nbsp;")<];
+// });
+// }).on("error", function (err) {
+// console.log(`Whatpulse request error: ${err.message}`);
+// });
+// }
+// setInterval(refreshWhatpulse, 6*3600*1000); //every 6 hours
+// refreshWhatpulse();
// function simpleLogEscape(str) {
// return str