Registry / devops / exframe-rest

exframe-rest

JSON →
library3.7.3jsnpmunverified

Exframe Rest is a lightweight wrapper around Express.js that provides restful routing for the Harmony Framework. The current stable version is 3.7.3, released under the ISC license. It defaults to port 8080, assumes JSON payloads, and sets CORS headers. Key differentiators include integration with the exframe ecosystem (exframe-health, exframe-logger, exframe-service) and a simple API for creating RESTful servers. Release cadence appears to be stable with infrequent updates.

npm install exframe-rest
INSTALL
IMPORT
SIG · EXFRAME-REST
E
exframe-rest
devopsjavascriptv3.7.3
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.

create
const { create } = require('exframe-rest')
const create = require('exframe-rest')
create is a named export, not default. CommonJS only (no ESM).
default
const rest = require('exframe-rest'); rest.create()
import rest from 'exframe-rest'
No default export; use named import or require the module and call create.

Demonstrates creating a REST server with exframe-rest, configuring port, and adding a POST endpoint.

const { create } = require('exframe-rest'); const app = create(process.env.PORT || 8080); app.post('/test', (req, res) => { res.json({ result: 1 }); }); app.listen(() => console.log('Server running'));
Debug
Known issues
breakingVersion 3.x requires Node >=14; earlier versions may fail silently.
fix
Update Node.js to version 14 or later.
affects: >=3.0.0
deprecatedPeer dependency exframe-health 1.x has been deprecated.
fix
Use exframe-health 2.x if compatible (check changelog).
affects: >=3.0.0
gotchaThe create function does not start the server; you must call app.listen() explicitly.
fix
Call app.listen() after defining routes.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: rest.create is not a function
Importing incorrectly (e.g., const rest = require('exframe-rest') then rest.create()) but rest is an object, so rest.create exists. Actually the error occurs if something else is wrong.
fix
Use const { create } = require('exframe-rest');
Error: Cannot find module 'exframe-health'
Missing peer dependency.
fix
Install peer dependencies: npm install exframe-health exframe-logger exframe-service
TypeError: app.post is not a function
Server not created properly; app is not an Express app.
fix
Ensure create() is called correctly: const app = create(port);
Upgrade
Version history
3.7.3latest on npm
Audit
Dependencies
exframe-healthrequiredHealth check integration for the Harmony Framework
exframe-loggerrequiredLogging provider
exframe-servicerequiredService layer integration
Agent activity
2 hits · last 30 days
node
2
Resources
exframe-rest — npm install exframe-rest · libregistry