Connects, publishes one message to a channel, and closes.
Connection options plus the channel and payload.
How many subscribers received the message.
If the server rejects the credentials.
If the connection cannot be established.
1.0.6
import { publish } from 'edgeport/redis';await publish({ hostname: 'redis.example.com', channel: 'deploys', message: JSON.stringify({ sha: '9f2c1ab', env: 'production' })}); Copy
import { publish } from 'edgeport/redis';await publish({ hostname: 'redis.example.com', channel: 'deploys', message: JSON.stringify({ sha: '9f2c1ab', env: 'production' })});
Connects, publishes one message to a channel, and closes.