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

is this lib available via CDN? #1060

Closed
ORESoftware opened this issue Jan 19, 2017 · 6 comments
Closed

is this lib available via CDN? #1060

ORESoftware opened this issue Jan 19, 2017 · 6 comments

Comments

@ORESoftware
Copy link

ORESoftware commented Jan 19, 2017

Back on version 1.4.5, I could use this link to load socket.io into my front-end

'socketio': '//cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io',

and I could use socket.io in the browser like so

             var socket  = io.connect('http://127.0.0.1:3400');

               socket.on('error', function (err) {
               
               });

               socket.on('connect', function () {
              
               });

My concern is that with versions 1.7.x and greater, I should be importing socket.io-client into the front-end, however, I don't see any CDN's hosting socket.io-client, do I need it? How can I get it via CDN?

thanks!

@darrachequesne
Copy link
Member

@ORESoftware
Copy link
Author

ORESoftware commented Jan 20, 2017

@darrachequesne is that the same as socket.io-client? that's the confusing thing

@darrachequesne
Copy link
Member

Yes it is (it wouldn't make sense to provide a server build for the browser, would it?).

Would you know how we could make it clearer in the documentation?

@ORESoftware
Copy link
Author

ORESoftware commented Jan 20, 2017

hmmm, beyond naming it socket.io-client instead of socket.io, I honestly don't know :) If it is a client/browser build, it should be called socket.io-client, right?

regarding a server build for the client, I suppose in some cases it would make sense, but not in very many cases.

@darrachequesne
Copy link
Member

It seems it's a bit too late for that 😃 : https://github.com/cdnjs/cdnjs/pull/31/files

Related: cdnjs/cdnjs#6738, cdnjs/cdnjs#9791

@ORESoftware
Copy link
Author

yeah, nbd thanks :)

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