Alex Rivera | Logout

Where is the socket.io client library?

Asked 2011-12-16T01:07:53.027
76

As far as I have seen, there is no explanation as to where we are to locate the client side script for socket.io if node.js is not used as the web server. I've found a whole directory of client side files, but I need them in a combined version (like it's served when using node.js webs servers). Any ideas?

Edit
Report

1 Answer

68

socket.io.js is what you're going to put into your client-side html. Something like:

<script type="text/javascript" src="socket.io.js"></script>

my script is located:

/usr/local/lib/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js

copy that file to where you want your server to serve it.

answered 2011-12-16T02:57:10.460

Your Answer