Registry / database / ceramic-backend-mongodb

ceramic-backend-mongodb

JSON →
library1.2.0jsnpmunverified

MongoDB backend for the Ceramic ODM (Object Document Mapper), enabling MongoDB integration with Ceramic's data access API. Version 1.2.0 targets Node.js >= 0.11.9. Released as part of a serialization-focused ecosystem, it provides a bridge between Ceramic abstractions and MongoDB. It has low maintenance cadence and is primarily of historical interest for legacy projects using older Node.js versions.

npm install ceramic-backend-mongodb
INSTALL
IMPORT
SIG · CERAMIC-BACKEND-MO
C
ceramic-backend-mongodb
databasejavascriptv1.2.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 (class)
import Backend from 'ceramic-backend-mongodb';
const Backend = require('ceramic-backend-mongodb');
The package may be ESM-only; check your Node version. CommonJS require may work in older versions.
Backend
import Backend from 'ceramic-backend-mongodb';
import { Backend } from 'ceramic-backend-mongodb';
Default export, not named export. Named import will result in undefined.
MongoBackend
import Backend from 'ceramic-backend-mongodb'; const MongoBackend = Backend;
import MongoBackend from 'ceramic-backend-mongodb';
The module itself does not export 'MongoBackend'; only default export is available.

Shows how to import and instantiate the MongoDB backend with a connection URI, then connect via Ceramic.

import Backend from 'ceramic-backend-mongodb'; import { connect } from 'ceramic'; const backend = new Backend({ uri: process.env.MONGO_URI || 'mongodb://localhost:27017/mydb' }); const db = await connect(backend); // Use db for queries
Debug
Known issues
breakingThe package requires Node.js >= 0.11.9 but does not support ESM natively on versions older than 13.2.
fix
Use CommonJS require or upgrade Node.js to 13.2+ for ESM support.
affects: >=0.11.9 <13.2
gotchaThe package is the default export, not named. Using `import { Backend }` will result in undefined.
fix
Use `import Backend from 'ceramic-backend-mongodb'` without braces.
affects: >=1.0.0
gotchaThe package has low maintenance; consider using an alternative with active support.
fix
Evaluate if `ceramic-backend-mongodb` meets your project's long-term needs.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'ceramic-backend-mongodb'
Package not installed or typo in import
fix
Run `npm install ceramic-backend-mongodb` and check case sensitivity.
TypeError: Backend is not a constructor
Importing named export instead of default
fix
Change to `import Backend from 'ceramic-backend-mongodb'` (no braces).
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
OpenAI (training)
1
Resources
ceramic-backend-mongodb — npm install ceramic-backend-mongodb · libregistry