Skip to content

GlibAI/mongoFire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoFire

Work in progress

Example Usage

const MongoClient = require('mongodb').MongoClient;
const { mongoFire } = require('mongofire');
const url = 'mongodb://localhost:27017/';
const dbName = 'testdb';
var client, mdb, db;

async function handler(req, res) {
    try {
        client = await MongoClient.connect(url, { useNewUrlParser: true });
        mdb = client.db(dbName);
        db = new mongoFire(client, mdb);
        await db.ref('testFlows').child('data').set({'test':'test'});
        client.close();
    } catch (e) { 
        console.log(e);
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published