summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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