summaryrefslogtreecommitdiffstats
path: root/node_modules/mongoose/tools
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/mongoose/tools')
-rw-r--r--node_modules/mongoose/tools/auth.js30
-rw-r--r--node_modules/mongoose/tools/repl.js36
-rw-r--r--node_modules/mongoose/tools/sharded.js45
3 files changed, 0 insertions, 111 deletions
diff --git a/node_modules/mongoose/tools/auth.js b/node_modules/mongoose/tools/auth.js
deleted file mode 100644
index 7cfaf86..0000000
--- a/node_modules/mongoose/tools/auth.js
+++ /dev/null
@@ -1,30 +0,0 @@
-'use strict';
-
-const Server = require('mongodb-topology-manager').Server;
-const co = require('co');
-const mongodb = require('mongodb');
-
-co(function*() {
- // Create new instance
- const server = new Server('mongod', {
- auth: null,
- dbpath: '/data/db/27017'
- });
-
- // Purge the directory
- yield server.purge();
-
- // Start process
- yield server.start();
-
- const db = yield mongodb.MongoClient.connect('mongodb://localhost:27017/admin');
-
- yield db.addUser('passwordIsTaco', 'taco', {
- roles: ['dbOwner']
- });
-
- console.log('done');
-}).catch(error => {
- console.error(error);
- process.exit(-1);
-});
diff --git a/node_modules/mongoose/tools/repl.js b/node_modules/mongoose/tools/repl.js
deleted file mode 100644
index 8139a51..0000000
--- a/node_modules/mongoose/tools/repl.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-const co = require('co');
-
-co(function*() {
- const ReplSet = require('mongodb-topology-manager').ReplSet;
-
- // Create new instance
- const topology = new ReplSet('mongod', [{
- // mongod process options
- options: {
- bind_ip: 'localhost', port: 31000, dbpath: `/data/db/31000`
- }
- }, {
- // mongod process options
- options: {
- bind_ip: 'localhost', port: 31001, dbpath: `/data/db/31001`
- }
- }, {
- // Type of node
- arbiterOnly: true,
- // mongod process options
- options: {
- bind_ip: 'localhost', port: 31002, dbpath: `/data/db/31002`
- }
- }], {
- replSet: 'rs'
- });
-
- yield topology.start();
-
- console.log('done');
-}).catch(error => {
- console.error(error);
- process.exit(-1);
-});
diff --git a/node_modules/mongoose/tools/sharded.js b/node_modules/mongoose/tools/sharded.js
deleted file mode 100644
index 2b0cc04..0000000
--- a/node_modules/mongoose/tools/sharded.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-const co = require('co');
-
-co(function*() {
- const Sharded = require('mongodb-topology-manager').Sharded;
-
- // Create new instance
- const topology = new Sharded({
- mongod: 'mongod',
- mongos: 'mongos'
- });
-
- yield topology.addShard([{
- options: {
- bind_ip: 'localhost', port: 31000, dbpath: `/data/db/31000`, shardsvr: null
- }
- }], { replSet: 'rs1' });
-
- yield topology.addConfigurationServers([{
- options: {
- bind_ip: 'localhost', port: 35000, dbpath: `/data/db/35000`
- }
- }], { replSet: 'rs0' });
-
- yield topology.addProxies([{
- bind_ip: 'localhost', port: 51000, configdb: 'localhost:35000'
- }], {
- binary: 'mongos'
- });
-
- console.log('Start...');
- // Start up topology
- yield topology.start();
-
- console.log('Started');
-
- // Shard db
- yield topology.enableSharding('test');
-
- console.log('done');
-}).catch(error => {
- console.error(error);
- process.exit(-1);
-});