Skip to content

Instantly share code, notes, and snippets.

@xieyu
xieyu / rs-connect.js
Created September 29, 2018 02:56 — forked from chrisckchang/rs-connect.js
replica set connection with nodejs native
/**
* MongoDB NodeJS Driver Production Connection Example
*
* Copyright (c) 2015 ObjectLabs Corporation
* Distributed under the MIT license - http://opensource.org/licenses/MIT
*/
var MongoClient = require('mongodb').MongoClient;
/**