Taweerat Chaiman
Taweerat Chaiman

Reputation: 216

nowjs initialize is not a function

var express = require('express');
var app = express();
var nowjs = require('now');
app.get('/', function(req, res) {
  res.send('index');
});

var server = app.listen(4000);

/* Initialing now.js for broadcast the functions */
var everyone = nowjs.initialize(server);
everyone.now.sendMessage = function(message) {
  everyone.now.receiveMessage(message);
};

I have a problem with nowjs, with this code it said

var everyone = nowjs.initialize(server);
                     ^
TypeError: nowjs.initialize is not a function

I have no idea why and I've tried to search on Google. No one face this problem.

Reference : https://github.com/Flotype/now

Thank you guys

Upvotes: 0

Views: 410

Answers (1)

indieNik
indieNik

Reputation: 134

You might want to check this out - https://github.com/Flotype/now/issues/208

Sad, isn't it? :(

Upvotes: 0

Related Questions