This is a simple package that you can run `mongodump` and `mongorestore` commands on both `Linux` and `Windows` platforms.
npm install @burakbey/mongodb-toolsThis is a simple package that you can run mongodump and mongorestore commands on both Linux and Windows platforms.
``ts
import { dump } from '@burakbey/mongodb-tools';
import { join } from 'path';
async function myFunction() {
const uri = 'mongodb://127.0.0.1/database';
const output = join(__dirname, 'dump');
const outputFolderName = await dump(uri, output);
console.log(Done. ${join(output, outputFolderName)});
}
myFunction();
``