Real-world examples showing how to use the OddSockets JavaScript SDK in production applications
Try Interactive Democonst OddSockets = require('@oddsockets/js');
const client = new OddSockets({
apiKey: 'ak_live_1234567890abcdef'
});
const channel = client.channel('my-channel');
// Subscribe to messages
channel.subscribe((message) => {
console.log('Received:', message);
});
// Publish a message
channel.publish('Hello, World!');