I added this line to my index.jade file:
script(src="/socket.io/socket.io.js")
And somehow it automagically knew how to serve that Javascript file to my client. How does that work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Socket.io adds a request handler to the server. See:
https://github.com/learnboost/socket.io/blob/master/lib/manager.js#L90
The handler deals with any requests that begin with /socket.io and handles them (e.g. serving up the socket.io.js file from wherever the module is installed)