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);
Package detail
@streamx/streamx
please do not use, will be removed soon
the official streamx javascript client