Registry / cms / jungles-rest

jungles-rest

JSON →
library3.0.0jsnpmunverified

Jungles REST (v3.0.0) is the REST layer for the Jungles CMS framework, built for Express.js developers. It provides backend data handling, type validation, and file storage integration. The ecosystem includes optional data adapters (memory, Postgres), file adapters (disk), and middleware. Considered unstable, it is no longer actively maintained; developers should evaluate alternatives. Release cadence is low, with last updates several years ago. Key differentiators include schema-based validation and mountable Express sub-apps.

npm install jungles-rest
INSTALL
IMPORT
SIG · JUNGLES-REST
J
jungles-rest
cmsjavascriptv3.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.

jungles-rest
import junglesRest from 'jungles-rest'
const junglesRest = require('jungles-rest')
The package may be ESM-only; ensure your project uses ES modules.
init
import { init } from 'jungles-rest'
const init = require('jungles-rest').init
init is a named export from the main module.
default
import junglesRest from 'jungles-rest'; junglesRest.init({...})
import * as junglesRest from 'jungles-rest'; junglesRest.default.init({...})
Default import likely returns an object with init method.

Initialize and mount the Jungles REST layer with an in-memory data store and a custom type.

import express from 'express'; import { init } from 'jungles-rest'; const app = express(); const port = process.env.PORT ?? 3000; // Define a type for validation and schema const languageType = { root: true, name: 'language', children: ['page', 'projects'], form: 'forms/language', schema: { title: [validators.required(), validators.string()] } }; // Initialize jungles with in-memory data adapter const jungles = init({ data: new (await import('jungles-data-memory'))([]), types: [languageType] }); // Mount the jungles REST router app.use('/jungles', jungles.app); app.listen(port, () => console.log(`Server running on port ${port}`));
Debug
Known issues
deprecatedPackage is labeled unstable and has no recent updates.
fix
Consider migrating to a more actively maintained CMS framework.
affects: *
breakingVersion 3.0.0 may have breaking changes from earlier versions; no changelog provided.
fix
Review the source code for changes if upgrading.
affects: 3.0.0
gotchaRequires the 'jungles' core module as a peer dependency; not installing it will cause runtime errors.
fix
Ensure 'jungles' is listed in your package.json dependencies.
affects: >=3.0.0
gotchaThe package uses CommonJS internally but may not export correctly in ESM environments.
fix
Use dynamic import or ensure compatibility with your module system.
affects: >=3.0.0
gotchaNo TypeScript definitions provided; type errors will occur if using TypeScript.
fix
Create custom ambient declarations or use // @ts-ignore.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'jungles'
Missing peer dependency 'jungles'.
fix
Run 'npm install jungles'.
TypeError: jungles.app is not a function
init did not mount the app properly; verify that init returns an object with 'app'.
fix
Check that init is called with the correct options (data, types).
Error: Schema validation failed for field 'title'
Input does not match the schema defined in the type.
fix
Correct the input data to satisfy the schema (e.g., include a non-empty string for 'title').
Error: No data adapter specified
Missing 'data' option in init.
fix
Pass a valid data adapter (e.g., jungles-data-memory) in the init options.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
expressrequiredCore peer dependency for mounting routes
junglesrequiredPrincipal framework dependency
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
jungles-rest — npm install jungles-rest · libregistry