Overview
channel().publish(...) lets backend JavaScript code publish events or messages into a PulseGrid channel over HTTP.
Setup
Provide:
- text
- optional identifierId
- optional identifierLabel
- optional event
- optional meta
- optional extra data
Code example
const result = await pulsegrid.channel("demo-channel").publish(
"Hello from server publish",
{
identifierId: "server_bot",
identifierLabel: "Server Bot",
meta: {
source: "js_http_publish",
},
}
);
console.log(result);
Notes
Great for backend workflows, notifications, bots, and scheduled events.