diff --git a/lib/socket.io.js b/lib/socket.io.js index 62199d442c..3c6c9ccbff 100644 --- a/lib/socket.io.js +++ b/lib/socket.io.js @@ -39,6 +39,13 @@ exports.clientVersion = client.version; */ exports.listen = function (server, options, fn) { + if ('function' == typeof server) { + console.warn('Socket.IO\'s `listen()` method expects an `http.Server` instance\n' + + 'as its first parameter. Are you migrating from Express 2.x to 3.x?\n' + + 'If so, check out the "Socket.IO compatibility" section at:\n' + + 'https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x'); + } + if ('function' == typeof options) { fn = options; options = {};