0.0.45 • Published 6 years ago
@streamx/streamx v0.0.45
const streamx = require('@streamx/streamx')({ apiKey: HERE_YOUR_API_KEY });
// subscribe for a topic
streamx.subscribe('my_awesome_topic', (message) => {
console.log(JSON.stringify(message));
});
// publish a message in a topic
let message = {
hello: 'world'
};
streamx.publish('my_awesome_topic', message);