From 5d0305e8f284fe9ce0ec47325a6fd56508ce65f4 Mon Sep 17 00:00:00 2001 From: nanalelfe Date: Sun, 28 Aug 2016 01:50:33 -0400 Subject: Integrated socketst.io and setup the notification function --- bin/www.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3