Neverending Puppy Marathon

    @casual-simulation/causal-tree-store-mongodb
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.15-alpha.2537844219 • Public • Published

    Causal Tree Store MongoDB

    npm (scoped)

    A causal repo store that interfaces with MongoDB.

    Usage

    Create a MongoDB Causal Repo Store

    import { MongoDBRepoStore } from '@casual-simulation/causal-tree-store-mongodb';
    import { MongoClient } from 'mongodb';
    
    MongoClient.connect('mongodb://127.0.0.1:27017', client => {
        const db = client.db('my_db');
        const objects = db.collection('objects');
        const heads = db.collection('heads');
        const store = new MongoDBRepoStore(objects, heads);
    
        store.init().then(() => {
            // TODO: Store or create objects and heads
        });
    });

    Install

    npm i @casual-simulation/causal-tree-store-mongodb

    DownloadsWeekly Downloads

    44

    Version

    3.0.15-alpha.2537844219

    License

    MIT

    Unpacked Size

    30 kB

    Total Files

    15

    Last publish

    Collaborators

    • kallyngowdyyeti
    • casualsimulation