aboutsummaryrefslogtreecommitdiff
path: root/bin/www.js
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-08-28 05:50:33 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-08-28 05:50:33 +0000
commit5d0305e8f284fe9ce0ec47325a6fd56508ce65f4 (patch)
treee7c434eb54d985e29cbf71caa42a9e4fea0bb68a /bin/www.js
parentd94aad5042d2fd09242581f11415de4a978168be (diff)
Integrated socketst.io and setup the notification function
Diffstat (limited to 'bin/www.js')
-rw-r--r--bin/www.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/www.js b/bin/www.js
index e7c80f3..6097e0a 100644
--- a/bin/www.js
+++ b/bin/www.js
@@ -1,9 +1,11 @@
var dbFile = require('../node_simple');
var app = require('../app');
-var http = require('http');
+/*var http = require('http');
var server = http.createServer(app);
+var io = require('socket.io')(server);
+
var port = '3000';
app.set('port', port);
@@ -19,3 +21,9 @@ dbFile.setupDB(function (success, mssg) {
});
+io.on('connection', function (socket) {
+ socket.emit('alert', "hello from the server");
+ socket.on('my other event', function (data) {
+ console.log(data);
+ });
+});*/ \ No newline at end of file