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);
};
我有一个问题与nowjs,这段代码说,
var everyone = nowjs.initialize(server);
^
TypeError: nowjs.initialize is not a function
我不知道为什么,我试着在谷歌上搜索。没有人面临这个问题。
参考:https://github.com/Flotype/now
谢谢大家
您可能想看看这个- https://github.com/Flotype/now/issues/208
很悲伤,不是吗?(