This is a small npm package to send events directly to a Clay Event Hub stream.
// Require the package
const hub = require('clay-hub-sdk')
// Plug in your stream id
const stream = hub('stream-id')
// Send any event
stream({
type: 'USER_REGISTERED',
firstName: 'Nicolas',
...
})
// Or even just number or strings
stream(3)
stream('USER_DISCONNECTED')
Go to Clay Event Hub to create an account.