hera-mongo-tools
Version:
4HERA Node packages
91 lines (75 loc) ⢠2.05 kB
Markdown
<h1 align="center">Welcome to hera-mongo-tools š</h1>
<p>
<a href="https://www.npmjs.com/package/hera-mongo-tools" target="_blank">
<img alt="Version" src="https://img.shields.io/npm/v/hera-mongo-tools.svg">
</a>
<a href="#" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
</a>
<a href="https://twitter.com/brokolililer" target="_blank">
<img alt="Twitter: brokolililer" src="https://img.shields.io/twitter/follow/brokolililer.svg?style=social" />
</a>
</p>
> 4HERA Node packages
### š [Homepage](hera-mongo-tools)
### ⨠[Demo](https://control-path.4hera.com)
## Install
```sh
npm install hera-mongo-tools
```
## mongodump
```sh
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
```sh
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
```sh
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](https://burak-simsek.com)
- Twitter: [@brokolililer](https://twitter.com/brokolililer)
- LinkedIn: [@brokolililer](https://linkedin.com/in/brokolililer)
## Show your support
Give a āļø if this project helped you!