var express = require('express');
var app = express();
var nowjs = require('now');
app.get('/', function(req, res) {
res.send('index');
});
var server = app.listen(4000);
/* Setting up now.js to broadcast functions */
var everyone = nowjs.initialize(server);
everyone.now.sendMessage = function(message) {
everyone.now.receiveMessage(message);
};
I encountered an issue with nowjs while running this code
var everyone = nowjs.initialize(server);
^
TypeError: nowjs.initialize is not a function
I am unsure why this error is occurring and my attempts to find a solution on Google have been unsuccessful.
Reference : https://github.com/Flotype/now
Appreciate any help, thank you.