hera-mongo-tools
v0.1.2
Published
4HERA Node packages
Downloads
8
Maintainers
Readme
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
- Website: burak-simsek.com
- Twitter: @brokolililer
- LinkedIn: @brokolililer
Show your support
Give a ⭐️ if this project helped you!