Registry / storage / redis-client

redis-client

JSON →
library0.3.5jsnpmunverified

A lightweight Redis client for Node.js, version 0.3.5. Provides basic Redis commands like get, set, del, incr, and support for key expiry. Released in early Node.js days (circa 2011) and no longer actively maintained. Not for production use. Modern alternatives: ioredis or redis (node_redis).

npm install redis-client
INSTALL
IMPORT
SIG · REDIS-CLIENT
R
redis-client
storagejavascriptv0.3.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import RedisClient from 'redis-client'
✗ const redis = require('redis-client')
Package has a default export. Use ESM import for clarity.
RedisClient
✓ import RedisClient from 'redis-client'
✗ import { RedisClient } from 'redis-client'
Named export does not exist; only default export.
createClient
✓ import RedisClient from 'redis-client'; const client = new RedisClient();
✗ const client = RedisClient.createClient();
No createClient function; instantiate with new.

Connects to Redis, sets a key, and retrieves it. Uses callback pattern. Note: Redis server must be running on localhost:6379.

import RedisClient from 'redis-client'; const client = new RedisClient(); client.on('connect', () => { console.log('Connected to Redis'); }); client.set('key', 'value', (err, reply) => { if (err) throw err; console.log(reply); // OK }); client.get('key', (err, reply) => { if (err) throw err; console.log(reply); // 'value' });
Debug
Known issues
deprecatedPackage is deprecated; no longer maintained.
fix
Migrate to ioredis or node_redis (redis npm package).
affects: >=0.0.0
breakingCallbacks are used; no promise support.
fix
Use modern Redis clients with async/await support.
affects: >=0.1.0
gotchaDefault export is a class; must use new keyword.
fix
Instantiate with new RedisClient() instead of calling as function.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: RedisClient is not a constructor
Using named import instead of default import or using require incorrectly.
fix
Use import RedisClient from 'redis-client' or const RedisClient = require('redis-client').default if using CommonJS.
Error: Redis connection refused
Redis server not running or wrong host/port.
fix
Ensure Redis is started: redis-server. Or pass custom options: new RedisClient({host: '...', port: ...}).
Upgrade
Version history
0.3.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
redis-client — npm install redis-client · libregistry