From dc0f6bc303917675b9800e7361e7d3ffd724daba Mon Sep 17 00:00:00 2001 From: Alejandro Lechuga Date: Fri, 15 Nov 2013 02:44:36 -0800 Subject: [PATCH] Update README.md I'm not sure about the other code examples but NodeJS didn't work with that code so I added the ".connect" ```js var socket = require('socket.io-client').connect('http://localhost'); socket.on('connect', function(){ socket.on('event', function(data){}); socket.on('disconnect', fucntion(){}); }); ``` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce93dd8d7..bcae5cf61 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Add `socket.io-client` to your `package.json` and then: ```js - var socket = require('socket.io-client')('http://localhost'); + var socket = require('socket.io-client').connect('http://localhost'); socket.on('connect', function(){ socket.on('event', function(data){}); socket.on('disconnect', fucntion(){});