A utility to obtain a writeable filesystem path suitable for MongoDB's --dbpath option, creating the directory if it doesn't exist. Version 0.0.1 is the only release; no maintenance or release cadence indicated. It differentiates by platform: on Travis CI uses process.cwd(), on AppVeyor uses LOCALAPPDATA, and on local laptops defaults to ~/.mongodb/data/<name>. Useful for scripts that need a predictable MongoDB data directory across environments.
npm install mongodb-dbpathNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use dbpath function to get a writable MongoDB data directory path.
Always pass an object { name: 'your-dir' }.Ensure process.cwd() is writable or set HOME environment variable.
Ensure LOCALAPPDATA is set or use a different method.
Pass an opts object: dbpath({ name: 'my-db' }, callback);Set HOME environment variable to a writable directory or adjust permissions.
No dependency data recorded yet.