Registry / devops / redis-koa-app-rpf

redis-koa-app-rpf

JSON →
library0.7.15jsnpmunverified

Redis Koa2 application archetype (v0.7.15) providing boilerplate lifecycle management for Koa applications with Redis integration. It extracts configuration from environment variables according to a spec file and invokes a main function. Used by several projects like geo-cache, refind, and resend. Its key differentiator is a minimal, convention-over-configuration approach focused on Redis-backed Koa apps. Development appears to be stalled with no recent releases or maintenance updates.

npm install redis-koa-app-rpf
INSTALL
IMPORT
SIG · REDIS-KOA-APP-RPF
R
redis-koa-app-rpf
devopsjavascriptv0.7.15
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
const app = require('redis-koa-app-rpf');
import app from 'redis-koa-app-rpf'; // ESM not supported
Package uses CommonJS and exports a single function.
require
require('redis-koa-app-rpf')(require('../package'), require('./spec'), require('./main'))
require('redis-koa-app-rpf').default(...) // No default export in CJS
The exported function is called immediately with three required arguments: package.json, spec module, and main function.
app-spec
const appSpec = require('app-spec');
const appSpec = require('app-spec').default; // Wrong if not ESM
The app-spec package is used internally for config extraction.

Shows minimal setup with spec definition, main function, and entry point invocation.

const path = require('path'); // Create spec.js module with environment variable definitions const spec = { port: { default: 3000 }, redisUrl: { default: 'redis://localhost:6379' } }; // Create main.js module with your Koa logic const main = async ({ config, redisClient, app }) => { app.use(async ctx => { ctx.body = 'Hello from redis-koa-app-rpf'; }); }; // index.js require('redis-koa-app-rpf')( require('./package.json'), spec, main ).catch(err => { console.error(err); process.exit(1); });
Debug
Known issues
deprecatedPackage appears to be unmaintained. No updates since 2018.
fix
Consider migrating to a more modern framework like koa2+ with manual Redis setup.
affects: >=0.0.0
gotchaThe exported function expects exactly three arguments: package.json object, spec object, and main function.
fix
Ensure you pass all three required arguments; otherwise, the application will throw.
affects: >=0.0.0
gotchaConfiguration is extracted from process.env according to the spec; missing environment variables may cause runtime errors.
fix
Define all required environment variables or provide defaults in the spec.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: require(...) is not a function
Calling require('redis-koa-app-rpf') without proper arguments or using incorrect import style.
fix
Use require('redis-koa-app-rpf')(pkg, spec, main) with three arguments.
Error: Config validation failed: missing required key 'redisUrl'
Environment variable REDIS_URL not set or spec defines it as required.
fix
Ensure REDIS_URL is set in environment or provide a default in spec.
Error: Cannot find module 'app-spec'
Missing dependency app-spec, which is required by redis-koa-app-rpf.
fix
Run npm install app-spec --save
Upgrade
Version history
0.7.15latest on npm
Audit
Dependencies
app-specrequiredUsed for configuration specification extraction from package.json and spec module.
koarequiredWeb framework for building Koa applications.
redisrequiredRedis client for database interaction.
Agent activity
2 hits · last 30 days
node
2
Resources
redis-koa-app-rpf — npm install redis-koa-app-rpf · libregistry