Content Deep Dive
How to connect to Ably directly (and why you probably shouldn't) – Part 2
Blog post from Ably
Post Details
Company
Date Published
Author
Owen Pearson
Word Count
3,181
Language
English
Hacker News Points
-
Summary
In this tutorial, we learn how to build a minimal Ably SDK using NodeJS. We start by setting up the project and installing its dependencies. Then, we create an Ably class capable of connecting to Ably via a WebSocket connection. Next, we implement methods for attaching to channels, detaching from channels, publishing messages on a channel, entering presence, and leaving presence on a channel. Finally, we discuss why using an Ably SDK is preferable over building one's own solution in production environments.