mongodb-dbpath

0.0.1 • Public • Published

mongodb-dbpath

Get a path for --dbpath that's writeable for the current user and mkdirp it.

Installation

# For use in other modules
npm install --save mongodb-dbpath

# For use from cli
npm install -g mongodb-dbpath

Usage

Usage: mongodb-dbpath <name>

Get a path for --dbpath that's writeable for the current user and mkdirp it.

Usage:
  mongodb-dbpath my-db
  # On your laptop `~/.mongodb/data/my-db`

  mongodb-dbpath my-db
  # On travis `process.cwd() + /.mongodb/data/my-db`

  mongodb-dbpath my-db
  # On appveyor `process.env.LOCALAPPDATA + \.mongodb\data\my-db`

Options:
  --debug              Enable debug messages.
  -h --help            Show this screen.
  --version            Show version.

API

var dbpath = require('mongodb-dbpath');
dbpath(opts, function done (err, res) { })

dbpath(opts, callback)

opts

Required

name - String Subdirectory name.

callback

err - Error Contains errors if no search options are writeable which would be very strange.

res - String Path you can pass to --dbpath.

License

Apache 2.0

/mongodb-dbpath/

    Package Sidebar

    Install

    npm i mongodb-dbpath

    Weekly Downloads

    2,841

    Version

    0.0.1

    License

    Apache-2.0

    Last publish

    Collaborators

    • dbx-node
    • nbbeeken
    • orechova
    • himanshusinghs
    • c-buckingham
    • mongo-j
    • mabaasit
    • alexander_schroll
    • mongodb-js-user
    • rueckstiess
    • durran
    • lerouxb
    • fredtruman
    • mbroadst
    • hswolff
    • satyasinha
    • matt_d_rat
    • rhysm
    • tomhollander
    • alena.khineika
    • jeff-allen-mongo
    • mmarcon
    • jonathan.balsano
    • mongodb-build
    • jack.weir
    • mcasimir
    • kristina.stefano
    • jarjee
    • shaketbaby
    • devtoolsbot
    • addaleax
    • gribnoysup
    • mutukrish
    • imlucas