diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-08-28 05:50:33 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-08-28 05:50:33 +0000 |
| commit | 5d0305e8f284fe9ce0ec47325a6fd56508ce65f4 (patch) | |
| tree | e7c434eb54d985e29cbf71caa42a9e4fea0bb68a /bin/www.js | |
| parent | d94aad5042d2fd09242581f11415de4a978168be (diff) | |
Integrated socketst.io and setup the notification function
Diffstat (limited to 'bin/www.js')
| -rw-r--r-- | bin/www.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |
