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);
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
GlibAI/mongoFire
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published