npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nems

v1.4.1

Published

nodejs-embedded-mongodb-standalone is a promise based embedded mongodb distribution library that downloads a appropriate mongodb and utilizes it as standalone, e.g. for integration/functional tests.

Readme

nems

npm license github-issues

nodejs-embedded-mongodb-standalone is a promise based embedded mongodb distribution library that downloads a appropriate mongodb and utilizes it as standalone, e.g. for integration/functional tests.

nodei.co

stars forks

CircleCI: Circle CI build status

Features

Distributer

Downloads and extracts mongodb for a given version and download directory. The version is mandatory, the download directory may default to the OS temporary directory.

Usage:
var nems = require('nems');

nems.distribute('3.2.8', '.')
    .then(function (path) {
      // do anything else with the 'path' to the extracted mongo directory
    }).catch(function(err) {
      // catch any DownloadError, ExtractionError or standard Error
    });

You can use the download and extraction service separately:

Usage:
var nems = require('nems');

nems.download('3.2.8', '.')
    .then(function (file) {
      // do anything else with the 'file' string
    }.catch(err) {
      // catch any DownloadError or standard Error
    };
    
nems.extract('/path/to/file.gz', '3.2.8', '.')
    .then(function (path) {
      // do anything else with the 'path' to the extracted mongo directory
    }.catch(err) {
      // catch any ExtractionError or standard Error
    };

Process

Start a mongodb for the given file path.

Usage:
var nems = require('nems');

/**
 * Parameter: 
 *  path - path to the mongodb installation
 *  port - the mongodb port (optional)
 *  noprealloc - do not pre-allocate (optional)
 *  nojournal - do not use a journal (optional)
 *  dbpath - db working directory, if different from installation path (optional)
 * 
 */
nems.startMongo('path/to/mongodb/installation', 27017, true, true, 'path/to/db/working/directory')
    .then(function (pid) {
      // do anything with the returned process id
    }.catch(err) {
      // catch any standard Error, e.g. if child process to start mongo crashed
    };

Interface

A sophisticated module interface to download, extract and start a mongodb at once, as well as stopping it.

Usage:
var nems = require('nems');

/**
 * Parameter: 
 *  version - the desired mongodb version
 *  downloadDir - the directory to download and extract to (optional, defaults to the OS temporary directory)
 *  port - the mongodb port (optional)
 *  noprealloc - do not pre-allocate (optional)
 *  nojournal - do not use a journal (optional)
 *  dbpath - db working directory, if different from installation path (optional)
 * 
 */
nems.start('3.2.8', '.', 27017, true, true, 'path/to/db/working/directory')
    .then(function (pid) {
      // do anything with the returned process id
    }.catch(err) {
      // catch any MongoError or standard Error, e.g. if child process to start mongo crashed
    };
    
/**
 * Parameter: 
 *  path - path to the mongodb installation
 *  dbpath - db working directory, if different from installation path (optional)
 */
nems.stop('path/to/mongodb/installation','path/to/db/working/directory')
    .then(function (successMessage) {
      // do anything after mongodb shutdown
    }.catch(err) {
      // catch any MongoError or standard Error, e.g. if child process to start mongo crashed
    };

Install

npm i -S nems

Scripts

Within this module use:

  • npm start : node bin/start [version [directory [port [noprealloc [nojournal [dbpath]]]]]] will download, extract and start a mongodb for given version, download directory and additional parameter.

  • npm run dax : node bin/dax [version [directory]] will download and extract mongodb for given version and download directory.

  • npm run stop : node bin/stop [binPath [dbpath]] will stop mongodb for given db installation path and/or working directory.

If no parameters are given, defaults (version 2.4.9 and OS temp folder, resp. dbpath) are used.
Use only the 'h' flag to see further usage information.
HINT: use double-minus to pass parameters to npm run command, e.g npm start -- version

Within the source code project:

  • npm test : ./node_modules/gulp/bin/gulp.js test runs jshint on gulp, test and source files and runs all tests with code coverage analysis.

Contributing

Contributions welcome! Please submit all pull requests against master branch. If your pull request contains JavaScript patches or features, you should fully cover the code with unit tests. Thanks!

Author

Marcus Fuhrmeister [email protected] https://github.com/mfuhrmeister

License

  • MIT : http://opensource.org/licenses/MIT