edgeport - v1.0.6
    Preparing search index...

    Function command

    • Connects, runs a single command, and closes.

      The one-shot for a Worker that touches Redis once per request. Use connect when several commands share a connection.

      Parameters

      Returns Promise<RedisReply>

      The command's reply.

      If the server rejects the credentials.

      If the connection cannot be established.

      If the server replies with an error.

      1.0.6

      import { command } from 'edgeport/redis';

      const reply = await command({
      hostname: 'redis.example.com',
      password: env.REDIS_PASSWORD,
      args: ['GET', 'feature:flags']
      });
      const flags = reply.isNull ? {} : reply.json<Record<string, boolean>>();