Skip to content

xscheiner/mongodb-prebuilt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb-prebuilt

badge

Install mongodb prebuilt binaries using npm. This module helps you easily install the mongodb without having to compile anything.

MongoDB is an open-source, document database designed for ease of development and scaling.

Installation

Download and install the latest build of mongodb for your OS and add it to your projects package.json as a dependency:

npm install mongodb-prebuilt

--global to make MongoDB binaries accessible without additional configurations.

npm install -g mongodb-prebuilt

If that command fails with an EACCESS error you may have to run it again with sudo:

sudo npm install -g mongodb-prebuilt

Now you can just run mongod to run mongodb:

mongod

Complete list of programs:

About

Works on Mac, Windows, Linux and Solaris OSes that MongoDB supports.

Programmatic usage

let {MongodHelper} = require('mongodb-prebuilt');

let mongodHelper = new MongodHelper(['--port', "27018"]);

// OPTIONAL: to control what version of mongo you want to download

mongodHelper = new MongodHelper(['--port', "27018"], {
	version: 'x.x.x'
});

mongodHelper.run().then((started) => {
	console.log('mongod is running');
}, (e) => {
	console.log('error starting', e);
});

About

Install MongoDB prebuilt package using npm https://npmjs.org/package/mongodb-prebuilt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.5%
  • JavaScript 1.5%