Node.js-Chat
Node.js-Chat copied to clipboard
Express version 4 does not support function "configure"
Getting this error:
app.configure(function() { ^ TypeError: Object function (req, res, next) { app.handle(req, res, next); } has no method 'configure'
This is because Express version 4 does not support "configure" function: http://stackoverflow.com/questions/22202232/express-has-no-method-configure-error
However package.json has hard-coded express dependency: "express": "*" which is causing express version 4 to download. Express version 3 works fine!
To get it to work with Express 4, just change
app.configure(function() {
app.use(express.static(__dirname + '/public'));
});
to be
app.use(express.static(__dirname + '/public'));