Registry / database / redis-node

redis-node

JSON →
library0.4.0jsnpmunverified

A complete Redis client for Node.js (version 0.4.0). This package provides a basic asynchronous Redis client with support for most Redis commands. It is one of the earliest Redis clients for Node.js, with a simple API and event-based model. Note that this package is outdated and unmaintained; users are strongly advised to migrate to 'redis' or 'ioredis' for modern, actively maintained Redis clients with better performance, features, and security.

npm install redis-node
INSTALL
IMPORT
SIG · REDIS-NODE
R
redis-node
databasejavascriptv0.4.0
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.

redis
✓ import redis from 'redis-node'
✗ const redis = require('redis').createClient()
The package exports a default function that returns a client; no named exports.
createClient
✓ const client = redis.createClient()
✗ const client = new redis.Client()
The client is created via a factory function, not a constructor.
client.on('connect')
✓ client.on('connect', callback)
✗ client.connect(callback)
Connection events are handled via event listeners, not callbacks.

Demonstrates connecting to Redis, setting and getting a key asynchronously, and handling connection events.

import redis from 'redis-node'; const client = redis.createClient(6379, '127.0.0.1'); 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, value) => { if (err) throw err; console.log(value); // 'value' client.quit(); }); });
Debug
Known issues
gotchaThis package is unmaintained and outdated. Use the modern 'redis' or 'ioredis' packages instead for security and performance.
fix
Replace with 'redis' (npm install redis) and update imports.
affects: >=0.0.1
gotchaThe client does not support promise-based API; all operations are callback-based.
fix
Use callback patterns or wrap with util.promisify.
affects: >=0.0.1
gotchaNo built-in reconnection or auto-recovery; connections can fail silently.
fix
Manually handle reconnection logic or switch to a client with auto-reconnection.
affects: >=0.0.1
Errors
Common errors & fixes
Error: getaddrinfo ENOTFOUND
Redis server hostname is incorrect or unreachable.
fix
Check the hostname and ensure Redis is running on that host.
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server is not running on the specified port or address.
fix
Start Redis server (e.g., redis-server) and verify port.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
Meta
1
Resources
redis-node — npm install redis-node · libregistry