@@ -8,7 +8,7 @@ A node.js wrapper for the mongo command line tool
88
99### Step 1: Prerequisites
1010
11- The mongodb must be installed and accessible in the path
11+ mongodb must be installed and accessible in the path
1212
1313### Step 2: Installation
1414
@@ -34,13 +34,26 @@ mongo.command('db.isMaster()').then(function (data) {
3434 console .log (' data = ' , data);
3535});
3636
37-
3837// data = {
3938// command: 'mongo --host localhost --port 27017 --eval "db.isMaster()"',
40- // raw: '["MongoDB shell version: 3.2.0\\nconnecting to: localhost:27017/test\\n{\\n\\t\\"ismaster\\" : false,\\n\\t\\"secondary\\" : false,\\n\\t\\"info\\" : \\"Does not have a valid replica set config\\",\\n\\t\\"isreplicaset\\" : true,\\n\\t\\"maxBsonObjectSize\\" : 16777216,\\n\\t\\"maxMessageSizeBytes\\" : 48000000,\\n\\t\\"maxWriteBatchSize\\" : 1000,\\n\\t\\"localTime\\" : ISODate(\\"2015-12-24T22:19:22.939Z \\"),\\n\\t\\"maxWireVersion\\" : 4,\\n\\t\\"minWireVersion\\" : 0,\\n\\t\\"ok\\" : 1\\n}\\n",""]',
39+ // raw: '["MongoDB shell version: 3.2.0\\nconnecting to: localhost:27017/test\\n{\\n\\t\\"ismaster\\" : false,\\n\\t\\"secondary\\" : false,\\n\\t\\"info\\" : \\"Does not have a valid replica set config\\",\\n\\t\\"isreplicaset\\" : true,\\n\\t\\"maxBsonObjectSize\\" : 16777216,\\n\\t\\"maxMessageSizeBytes\\" : 48000000,\\n\\t\\"maxWriteBatchSize\\" : 1000,\\n\\t\\"localTime\\" : ISODate(\\"2015-12-24T22:29:31.834Z \\"),\\n\\t\\"maxWireVersion\\" : 4,\\n\\t\\"minWireVersion\\" : 0,\\n\\t\\"ok\\" : 1\\n}\\n",""]',
4140// lines:
4241// ['MongoDB shell version: 3.2.0',
43- // 'connecting to: localhost:27017/test'],
42+ // 'connecting to: localhost:27017/test',
43+ // '{',
44+ // '\t"ismaster" : false,',
45+ // '\t"secondary" : false,',
46+ // '\t"info" : "Does not have a valid replica set config",',
47+ // '\t"isreplicaset" : true,',
48+ // '\t"maxBsonObjectSize" : 16777216,',
49+ // '\t"maxMessageSizeBytes" : 48000000,',
50+ // '\t"maxWriteBatchSize" : 1000,',
51+ // '\t"localTime" : ISODate("2015-12-24T22:29:31.834Z"),',
52+ // '\t"maxWireVersion" : 4,',
53+ // '\t"minWireVersion" : 0,',
54+ // '\t"ok" : 1',
55+ // '}',
56+ // ''],
4457// object:
4558// {
4659// ismaster: false,
@@ -50,7 +63,7 @@ mongo.command('db.isMaster()').then(function (data) {
5063// maxBsonObjectSize: 16777216,
5164// maxMessageSizeBytes: 48000000,
5265// maxWriteBatchSize: 1000,
53- // localTime: { '$date': '2015-12-24T22:19:22.939Z ' },
66+ // localTime: { '$date': '2015-12-24T22:29:31.834Z ' },
5467// maxWireVersion: 4,
5568// minWireVersion: 0,
5669// ok: 1
0 commit comments