Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require socket.io.js? #37

Closed
sneum opened this issue Aug 20, 2010 · 2 comments
Closed

require socket.io.js? #37

sneum opened this issue Aug 20, 2010 · 2 comments

Comments

@sneum
Copy link

sneum commented Aug 20, 2010

There's some discouraging difference between the example (which is running fine) and the example-code in the docs when it comes to require:
The readme shows './path/to/socket.io', which is a placeholder and probobly not meant to point to the socket.io-folder. The HowTo on the homepage shows './socket.io/socket.io.js', which is not existing.
Can someone clear this up, please ;) A working example would be nice, which doesn't require index.js.

@rauchg
Copy link
Contributor

rauchg commented Aug 25, 2010

Now it's possible to require socket.io/ and socket.io/lib/socket.io/ and they will both work. Is this what you were talking about ?

(http://github.com/LearnBoost/Socket.IO-node/commit/4bec17e903be14bf801058b8990c565356c2512a)

@sneum
Copy link
Author

sneum commented Aug 26, 2010

My main point was an inconsistency in the documentation when it comes to 'require'. Answering the issue "no socket.io.js in lib" cleared this up already, but I recommend to update the page here: http://socket.io/.
If you're new to serverside JavaScript, CommonJS and the index.js-default an require like '../' may cause a little confusion, so thanks for your changes here. It makes it a lot easier to understand the code, when writing examples for beginners :)

darrachequesne pushed a commit that referenced this issue Jul 4, 2024
darrachequesne pushed a commit that referenced this issue Jul 8, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants