aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-04-10 19:10:02 -0500
committerEv Bogue <ev@evbogue.com>2019-04-10 19:10:02 -0500
commita328b91ba5662c742a1ccba77fcf9b2ec8de5a83 (patch)
tree2ba07b3d17524f243171193996471bd3128bef95 /server.js
parent4082eaf9abf560c0299780cf50e2583f3185017c (diff)
1.1.0 -- refactor to store client data in browser with localforage.js
Diffstat (limited to 'server.js')
-rw-r--r--server.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/server.js b/server.js
index 30b13bc..f6756ca 100644
--- a/server.js
+++ b/server.js
@@ -9,7 +9,7 @@ http.createServer(
).listen(8089)
-opn('http://localhost:8089')
+//opn('http://localhost:8089')
// websocket server (8080)
@@ -36,24 +36,24 @@ wss.on('connection', function (ws) {
log: serverLog
}
ws.send(JSON.stringify(sendingLog))
- console.log('SENT ' + publicKey + ' TO CLIENT')
+ console.log('SENT ' + publicKey)
}
// if server log has less entries than the log sent by the client, write it to the server
if (serverLog.length < clientLog.length) {
fs.writeFile(__dirname + '/bogs/' + publicKey, JSON.stringify(clientLog), function (err) {
if (err) throw err
- console.log('SAVED ' + publicKey + ' TO SERVER')
+ console.log('SAVED ' + publicKey)
})
}
// if logs are identical, do nothing
if (serverLog.length == clientLog.length) {
- console.log(publicKey + ': LOGS ARE THE SAME')
+ console.log('SAME ' + publicKey)
}
// if log doesn't already exist, write it
} else {
fs.writeFile(__dirname + '/bogs/' + publicKey, JSON.stringify(clientLog), function (err) {
if (err) throw err
- console.log('SAVED ' + publicKey + ' TO SERVER')
+ console.log('SAVED ' + publicKey)
})
}
}