From 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Wed, 18 Nov 2020 23:26:45 +0100 Subject: rm node_modules --- node_modules/mongoose/tools/auth.js | 30 ----------------------- node_modules/mongoose/tools/repl.js | 36 --------------------------- node_modules/mongoose/tools/sharded.js | 45 ---------------------------------- 3 files changed, 111 deletions(-) delete mode 100644 node_modules/mongoose/tools/auth.js delete mode 100644 node_modules/mongoose/tools/repl.js delete mode 100644 node_modules/mongoose/tools/sharded.js (limited to 'node_modules/mongoose/tools') 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); -}); -- cgit v1.2.3