Registry / database / fwsp-redis-connection

fwsp-redis-connection

JSON →
library0.0.4jsnpmunverified

A lightweight utility for managing Redis connection and reconnection logic. Version 0.0.4 is the latest release, with no active development observed since 2017. It provides automated reconnection handling and event-based lifecycle management. Unlike full-featured Redis clients like ioredis, this package focuses solely on connection state management and can be used as a dependency for custom Redis tooling.

npm install fwsp-redis-connection
INSTALL
IMPORT
SIG · FWSP-REDIS-CONNECT
F
fwsp-redis-connection
databasejavascriptv0.0.4
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 RedisConnection from 'fwsp-redis-connection'
const RedisConnection = require('fwsp-redis-connection').default
CommonJS require returns the default export directly, not as .default
RedisConnection
import RedisConnection from 'fwsp-redis-connection'
import { RedisConnection } from 'fwsp-redis-connection'
The package exports a single default class, not a named export
constructor
const conn = new RedisConnection(config)
const conn = RedisConnection.create(config)
No static create method; instantiate with new

Creates a Redis connection with automatic reconnection handling and event listeners.

import RedisConnection from 'fwsp-redis-connection'; const config = { host: process.env.REDIS_HOST ?? 'localhost', port: parseInt(process.env.REDIS_PORT ?? '6379', 10), options: { maxRetries: 5 } }; const redisConn = new RedisConnection(config); redisConn.on('connect', () => { console.log('Connected to Redis'); }); redisConn.on('error', (err) => { console.error('Redis error:', err); }); redisConn.connect(); setTimeout(() => { redisConn.close(); }, 5000);
Debug
Known issues
deprecatedPackage has not been updated since 2017 and is effectively unmaintained.
fix
Consider using ioredis directly for active support and modern features.
affects: >=0.0.0
gotchaCommonJS require returns the class directly, not as .default. Using require('fwsp-redis-connection').default will be undefined.
fix
const RedisConnection = require('fwsp-redis-connection');
affects: >=0.0.0
gotchaThe package does not export named symbols; attempts to destructure import will fail.
fix
Use default import: import RedisConnection from 'fwsp-redis-connection';
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: RedisConnection is not a constructor
Importing as a named export instead of default.
fix
import RedisConnection from 'fwsp-redis-connection';
Error: RedisClient is not defined
Missing dependency 'redis' or incompatible version.
fix
npm install redis@2.8.0
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies
redisrequiredThe actual Redis client used for connection creation and communication
Agent activity
8 hits · last 30 days
node
8
Resources
fwsp-redis-connection — npm install fwsp-redis-connection · libregistry