hera-mongo-tools

0.1.2 • Public • Published

Welcome to hera-mongo-tools 👋

Version License: MIT Twitter: brokolililer

4HERA Node packages

🏠 Homepage

Demo

Install

npm install hera-mongo-tools

mongodump

const HeraMongoTools = require("hera-mongo-tools");
var commandArray = [
    '--uri=mongodb://127.0.0.1:27017/myDB',
    '--gzip',
    '-o',
    '/dump'
];
var options ={ command: commandArray,showCommand: false };
var hmt = new HeraMongoTools(options);
hmt.mongodump(function(callback) {
  //...
});

mongorestore

const HeraMongoTools = require("hera-mongo-tools");
var commandArray = [
    '--uri=mongodb://127.0.0.1:27017/myDB',
    '--nsInclude="*"',
    '--drop',
    '--gzip',
    '/dump'
];
var options ={ command: commandArray,showCommand: false };
var hmt = new HeraMongoTools(options);
hmt.mongorestore(function(callback) {
  //...
});

mongoimport

const HeraMongoTools = require("hera-mongo-tools");
var commandArray = [
    '--uri=mongodb://127.0.0.1:27017/myDB',
    '-c',
    'mycollection',
    '--jsonArray',
    '--drop',
    '--file',
    '/dump'
];
var options ={ command: commandArray,showCommand: false };
var hmt = new HeraMongoTools(options);
hmt.mongoimport(function(callback) {
  //...
});

Author

👤 Burak Simsek

Show your support

Give a ⭐️ if this project helped you!

Package Sidebar

Install

npm i hera-mongo-tools

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

4.93 kB

Total Files

3

Last publish

Collaborators

  • burak-simsek