A lightweight Redis helper function that wraps Redis commands, simplifying async calls with automatic connection handling. Current stable version 1.0.6, low release cadence. Provides a unified interface for any Redis command, reducing boilerplate. Works alongside get-redis-client and drf. No built-in retry or error handling, minimal abstraction. Suitable for small projects or rapid prototyping where full Redis client overhead is unwanted.
npm install do-redis-requestNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to Redis, executes GET command for key 'redisKey', logs the value, then closes the connection.
Ensure the client is connected before calling doRedisRequest. Use get-redis-client or ioredis/redis to create a valid client.
Always pass command names in lowercase.
Consult Redis command documentation for correct argument order and count.
Implement your own retry mechanism or use a more robust library like ioredis.
Use `import doRedisRequest from 'do-redis-request'` (ESM) or `const doRedisRequest = require('do-redis-request')` (CJS).Pass a connected Redis client instance to the 'client' option.
Use a Redis client from `get-redis-client` or another library that provides `quit`.
Provide exactly one argument (the key) for GET command; e.g., 'redisArguments': ['myKey'].
Start Redis server with `redis-server` or change client configuration to point to a running instance.