Nowjs Expressjs 3.0
I´m trying to get nowjs to work with expressjs 3.0alpha4. I´ve added the script to my view like so: And have also tried:
Solution 1:
You need to pass an HTTPServer object to the now initializer. Express 3.0 doesn't reveal this object like 2.x did.
So do something like:
var server = http.createServer(app).listen(app.get('port'), function() {
console.log('Express server listening on port ' + app.get('port'));
}
var everyone = require('now').initialize(server);
Solution 2:
First check if you have your static middleware setup.
app.use( express.static(__dirname + '/public' ) )
Second make sure you put your nowjs directory inside the public directory with the now.js file inside the nowjs directory.
Post a Comment for "Nowjs Expressjs 3.0"