Quick Start

Connect a Socket.IO client to your running server.

The app also speaks Socket.IO, with a fixed set of built-in events for presence, chat, typing and cursors — the original Slash Socket API, still served at /socket.io/ on your Mac. New projects are better off with fields (see How It Works): they're declared in a manifest, checked on the server, and run anywhere slash-socket-server does.

Slash Socket speaks the standard Socket.IO protocol, so any Socket.IO client library works against it with no Slash-specific SDK. Install socket.io-client in your web app and connect to the address shown on the dashboard.

npm install socket.io-client
client.js

Use your machine's LAN IP instead of localhost (shown as one of the Server Address cards on the dashboard) to connect from another device on the same network, or your forwarded domain if you've set up DNS Forwarding.

If you've restricted Allowed Origins in the Security panel, make sure the origin your web app is served from is on that list, or the connection will be rejected by CORS.