How do I connect to a phoenix channel from JS code on an unrelated website?

So I am building a server in phoenix and I want to ping it from another website I have. I am loading an external JS library on the other site and I want this library to communicate via web-sockets with my phoenix server. What is the best way to go about this? Should I just require the phoenix-socket NPM module in my library?

Thanks, Jon

That is the easiest way for sure, just bundle it with the rest of your javascript.

You can do it manually too, but replicating the reconnecting abilities and channel tagging and such though not ‘hard’ is entirely needless. :slight_smile: