Registry / devops / ragframework

ragframework

JSON →
library0.0.14jsnpmunverified

RAGFramework is a lightweight Node.js REST API Gateway framework designed for building and managing API gateways. Version 0.0.14 (released in early 2024) is the latest stable release, with an active but small release cadence. It provides routing, middleware support, and request/response transformation out of the box. Differentiators include simplicity (under 500 lines of core code) and zero external dependencies, making it suitable for microservices and edge deployments where minimal overhead is desired. Developed as part of a degree thesis, it is not battle-tested in production.

npm install ragframework
INSTALL
IMPORT
SIG · RAGFRAMEWORK
R
ragframework
devopsjavascriptv0.0.14
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.

RAGFramework
const RAGFramework = require('ragframework');
import RAGFramework from 'ragframework';
CJS-only; no ESM exports. Default export is the framework class.
Router
const { Router } = require('ragframework');
import { Router } from 'ragframework';
Named export, but only works with require(). ESM import will fail.
Middleware
const { Middleware } = require('ragframework');
const Middleware = require('ragframework').Middleware;
Same as Router, named require works.

Creates a basic REST API Gateway with a single GET route and starts the server on port 3000.

const RAGFramework = require('ragframework'); const app = new RAGFramework(); app.route('GET', '/hello', (req, res) => { res.end('Hello World'); }); app.listen(3000, () => { console.log('Server running on port 3000'); });
Debug
Known issues
breakingVersion 0.0.14 removed the 'createApp' factory function; use 'new RAGFramework()' instead.
fix
Replace 'const app = createApp()' with 'const app = new RAGFramework()'.
affects: <0.0.14
deprecatedThe 'addMiddleware' method is deprecated; use the constructor's middleware array instead.
fix
Pass middleware via 'new RAGFramework({ middleware: [...] })'.
affects: >=0.0.10
gotchaCJS-only; ESM imports (import) will throw 'ERR_REQUIRE_ESM'. Use require().
fix
Use require() or create an ESM wrapper.
affects: *
gotchaRoute handlers must have exactly 2 parameters (req, res); incorrect signatures cause silent failures.
fix
Ensure handlers are (req, res) => {...}.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'ragframework'
Package not installed or wrong npm registry.
fix
Run 'npm install ragframework' in your project.
TypeError: app.listen is not a function
Using ESM import (import) instead of require().
fix
Replace import with 'const RAGFramework = require('ragframework')'.
TypeError: Router is not a constructor
Incorrect import pattern for Router.
fix
Use 'const { Router } = require('ragframework')'.
Upgrade
Version history
0.0.14latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ragframework — npm install ragframework · libregistry