Socket io, where do I get the I need to give to clients?


Possible Duplicate:
Can't find

Well when using you need to include the client side using

<script type="text/javascript" src=""></script>

But where do I find the "" I need to put into the / folder for the clients?

Problem courtesy of: Wingblade

Solution - more information on the best practice for serving the client js file can be found here:

Solution courtesy of: Bulk


The file is generated and offered by the server, hence there's no need to provide it yourself.

If you're using jQuery, you can use the following snippet to get the file

$.getScript('http://localhost:1337/', function(){
    //You can now use the io namespace

I struggeled with this myself and have posted a question about it earlier on SO.

Discussion courtesy of: thomaux

This recipe can be found in it's original form on Stack Over Flow.