edgeport - v1.0.6
    Preparing search index...

    Function publish

    • Connects, publishes one message to a channel, and closes.

      Parameters

      Returns Promise<number>

      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' })
      });