This repository has been archived by the owner. It is now read-only.
Simple write stream that facilitates writing to MongoDB
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

npm version CircleCI

hapi-good-mongostore

Simple write stream that facilitates writing to MongoDB

Prerequisites

node >= 4 This module requires nodejs v4 or above.

Getting started

    npm install hapi-good-mongostore

Usage

hapi-good-mongostore is a write stream use to write to MongoDB in batches.

API

GoodMongoStore(dbUrl, [options])
  • dbUrl - MongoDB connection url

  • options - object properties

Name Type Description
clientOptions object

opts from node-mongodb-native#connect-options

collectionName string

Collection name

insertOptions object

Durability of writes

batchSize number

The number of documents consumed before writing to MongoDB

Run tests

bash test.sh

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.