Registry / storage / spawnpoint-redis

spawnpoint-redis

JSON →
library3.0.0jsnpmunverified

Redis plugin for the Spawnpoint framework, providing a configured ioredis instance mounted at app.redis. Version 3.0.0 wraps ioredis for Redis connections, with configuration via redis.json matching ioredis options. Integrates seamlessly with Spawnpoint's lifecycle and logging. Compared to using ioredis directly, spawnpoint-redis automates connection management within Spawnpoint apps. Release cadence is irregular, tied to Spawnpoint ecosystem updates.

npm install spawnpoint-redis
INSTALL
IMPORT
SIG · SPAWNPOINT-REDIS
S
spawnpoint-redis
storagejavascriptv3.0.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.

default
✓ import spawnpointRedis from 'spawnpoint-redis'
✗ const spawnpointRedis = require('spawnpoint-redis')
ESM import syntax; the package is ESM-only.
SpawnpointRedisPlugin
✓ import { SpawnpointRedisPlugin } from 'spawnpoint-redis'
✗ const { SpawnpointRedisPlugin } = require('spawnpoint-redis')
Named export for TypeScript types/classes.
spawnpointRedis
✓ import spawnpointRedis from 'spawnpoint-redis'
✗ import { spawnpointRedis } from 'spawnpoint-redis'
Default export is the plugin factory; named export does not exist.

Shows registering the plugin on a Spawnpoint app and using app.redis to set/get a key.

import spawnpointRedis from 'spawnpoint-redis'; import Spawnpoint from 'spawnpoint'; const app = new Spawnpoint(); app.plugin(spawnpointRedis); app.ready(async () => { await app.redis.set('key', 'value'); const val = await app.redis.get('key'); console.log('Redis key:', val); process.exit(0); }); app.catchErrors((err) => { console.error('Error:', err); process.exit(1); });
Debug
Known issues
breakingVersion 3.0.0 drops support for Node.js < 14 and is ESM-only.
fix
Update Node.js to 14+ and use import syntax instead of require().
affects: >=3.0.0
deprecatedPlugin configuration via redis.json is deprecated; use environment variables or direct options.
fix
Pass options directly to spawnpointRedis(options) instead of relying on redis.json.
affects: >=2.0.0
gotchaapp.redis is an ioredis instance; all ioredis methods are available but must be used asynchronously.
fix
Always await Redis calls (e.g., await app.redis.set(...)).
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/spawnpoint-redis/index.js from /path/app.js not supported.
Version 3+ is ESM-only but you are using CommonJS require().
fix
Convert your project to ESM (add "type": "module" to package.json) or use dynamic import() instead of require().
TypeError: app.redis.set is not a function
Plugin not fully initialized; app.redis is undefined or not yet an ioredis instance.
fix
Ensure spawnpointRedis is loaded as a plugin and Redis operations are inside app.ready().
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
ioredisrequiredCore Redis client library that spawnpoint-redis wraps and re-exports
Agent activity
16 hits · last 30 days
node
14
Resources
spawnpoint-redis — npm install spawnpoint-redis · libregistry