0.0.2 • Published 9 years ago

mongodb-installer v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

mongodb-installer

Download & copy Mongodb binaries to your project, create db directories, gives you the command to start the server

#Usage

npm install mongodb-installer

CLI

mongodb-installer --dbpath <realtive_path_to_data_db>

API

import PlatformInstaller from 'mongodb-installer'
let db_path = "data/db"
let installer = new MongoInstaller(process.platform, db_path)
  installer.run( (err, data) => {
    console.log(data);
    // { db: '/path/to/my/project/data/db',
    //  bin: '/path/to/my/project/data/mongodb/bin/mongod',
    //  params: ['--dbpath', '/path/to/my/project/data//data/db'],
    //  cmd: '/path/to/my/project/data/mongodb/bin/mongod --dbpath /path/to/my/project/data//data/db' }
  });