Skip to content

Releases: typegoose/mongodb-memory-server

v2.6.2

26 Oct 14:18
Compare
Choose a tag to compare

2.6.2 (2018-10-26)

Bug Fixes

  • MongoBinaryDownloadUrl: add Ubuntu 18.04 builds (b16d75a)

v2.6.1

25 Oct 13:50
Compare
Choose a tag to compare

2.6.1 (2018-10-25)

Bug Fixes

  • tune tmp dir opts, add debug info, add test for 4.0.3 (962fd67), closes #89

v2.6.0

18 Oct 16:05
Compare
Choose a tag to compare

2.6.0 (2018-10-18)

Features

  • add MONGOMS_DISABLE_POSTINSTALL env variable for disabling binary download on package install (e826566), closes #84 #84

v2.5.0

18 Oct 14:46
Compare
Choose a tag to compare

2.5.0 (2018-10-18)

Features

  • add env variable MONGOMS_DOWNLOAD_MIRROR to be able to specify a mirror download url for binary download (#93) (78f2e4a)

v2.4.4

17 Oct 16:11
Compare
Choose a tag to compare

2.4.4 (2018-10-17)

Bug Fixes

v2.4.3

06 Oct 07:25
Compare
Choose a tag to compare

2.4.3 (2018-10-06)

Bug Fixes

  • Debian unstable release should use mongod binaries for version 92 (1a74fb4), closes #85

v2.4.2

02 Oct 03:05
Compare
Choose a tag to compare

2.4.2 (2018-10-02)

Bug Fixes

  • TypeScript: add MongoMemoryReplSet to package exports (#83) (600b00b)

v2.4.1

01 Oct 12:01
Compare
Choose a tag to compare

2.4.1 (2018-10-01)

Bug Fixes

  • MongoMemoryReplSet.js: emit ‘init’, ‘running’, and ‘stopped’ to allow for easier cleanup of listeners (#82) (f5ae10a)

v2.4.0

30 Sep 10:38
Compare
Choose a tag to compare

2.4.0 (2018-09-30)

Features

Replica Set start:

import { MongoMemoryReplSet } from 'mongodb-memory-server';

const replSet = new MongoMemoryReplSet();
await replSet.waitUntilRunning();
const uri = await mongod.getConnectionString();
const port = await mongod.getPort();
const dbPath = await mongod.getDbPath();
const dbName = await mongod.getDbName();

// some code

// stop replica set manually
replSet.stop();
// or it should be stopped automatically when you exit from script

Available options

All options are optional.

const replSet = new MongoMemoryReplSet({
  autoStart, // same as for MongoMemoryServer
  binary: binaryOpts, // same as for MongoMemoryServer
  debug, // same as for MongoMemoryServer
  instanceOpts: [
    {
      args,  // any additional instance specific args
      port,  // port number for the instance
      dbPath, // path to database files for this instance
      storageEngine,  // same storage engine options
    },
    // each entry will result in a MongoMemoryServer
  ],
  // unless otherwise noted below these values will be in common with all instances spawned.
  replSet: {
    name,  // replica set name (default: 'testset')
    auth,  //  enable auth support? (default: false)
    args,  // any args specified here will be combined with any per instance args from `instanceOpts`
    count,  // number of `mongod` processes to start; (default: 1)
    dbName,  // default database for db URI strings. (default: uuid.v4())
    ip,  // by default '127.0.0.1', for binding to all IP addresses set it to `::,0.0.0.0`
    oplogSize,  // size (in MB) for the oplog; (default: 1)
    spawn,  // spawn options when creating the child processes
    storageEngine,  // default storage engine for instance. (Can be overridden per instance)
  }
});

v2.3.0

27 Sep 20:02
Compare
Choose a tag to compare

2.3.0 (2018-09-27)

Features