mongodb-prebuilt

Install MongoDB prebuilt binaries via npm

ISC 67 个版本
安装
npm install mongodb-prebuilt
yarn add mongodb-prebuilt
pnpm add mongodb-prebuilt
bun add mongodb-prebuilt
README

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.

CLI usage

The latest version of MongoDB is used by default for your OS and ~/.mongodb-prebuilt for downloading MongoDB binary. You can set desired version, download folder, architecture and platform through environment variables:

MONGODB_VERSION
MONGODB_DOWNLOADDIR
MONGODB_ARCH
MONGODB_PLATFORM

For example:

export MONGODB_DOWNLOADDIR='./' MONGODB_VERSION=3.4.10
mongod --port 27018 --dbpath ./mongodb --logpath /dev/stdout

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);
});

版本列表
6.5.0 2019-01-25
6.4.0 2018-12-03
6.3.6 2018-01-29
6.3.5 2018-01-25
6.3.4 2017-11-10
6.3.3 2017-06-06
6.3.2 2017-06-06
6.3.1 2017-04-20
6.3.0 2017-04-19
6.2.0 2017-04-01
6.1.0 2017-03-28
6.0.2 2017-03-12
6.0.1 2017-03-02
6.0.0 2017-03-01
6.0.0-rc2 2017-02-27
6.0.0-rc1 2017-02-27
5.0.8 2016-11-18
5.0.7 2016-11-09
5.0.6 2016-08-02
5.0.5 2016-05-20
5.0.4 2016-05-12
5.0.3 2016-04-12
5.0.2 2016-03-31
5.0.1 2016-03-31
5.0.0-rc.3 2016-03-31
5.0.0-rc.2 2016-03-18
5.0.0-rc.1 2016-03-18
5.0.0 2016-03-31
4.6.0 2016-03-07
4.5.5 2016-02-17
4.5.4 2016-02-13
4.5.3 2016-02-12
4.5.2 2016-02-10
4.5.1 2016-02-10
4.5.0 2016-02-10
4.4.9 2016-01-27
4.4.8 2016-01-13
4.4.7 2016-01-13
4.4.6 2016-01-13
4.4.5 2016-01-13
4.4.4 2016-01-13
4.4.3 2016-01-13
4.4.2 2016-01-13
4.4.1 2016-01-13
4.4.0 2016-01-12
4.2.16 2015-12-07
4.2.15 2015-12-07
4.2.14 2015-12-05
4.2.13 2015-11-30
4.2.12 2015-11-28
4.2.11 2015-11-24
4.2.10 2015-11-11
4.2.9 2015-11-09
4.2.8 2015-11-09
4.2.7 2015-11-05
4.2.6 2015-11-03
4.2.5 2015-10-30
4.1.6 2015-10-26
4.1.5 2015-10-21
4.1.4 2015-10-19
4.1.3 2015-10-12
4.1.2 2015-10-11
4.1.1 2015-10-10
4.1.0 2015-10-09
4.0.2 2015-10-09
4.0.2-beta1 2015-10-08
4.0.1 2015-10-07