JSPM

archivemongo

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20298F
  • License MIT

Module to archive mongo collections

Package Exports

  • archivemongo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (archivemongo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

archivemongo

Basically you can copy one collection data into another collection using this simple module.

Saga design

HOW TO INSTALL

npm install archivemongo --save

HOW TO USE

const archivemongo = require('archivemongo');

var mongoDetails = {

      						mongoDatabaseUrl 	  : 'mongodb://localhost:27018',
      						mainCollectionName    : 'country',
      						archiveCollectionName : 'country_archive'
}

archivemongo.ArchieveData(mongoDetails, function(err, done){
    if(err){
        console.log("Err is : ", err);
    }else{
        console.log("Done is : ", done)
    }
})