diff options
Diffstat (limited to 'node_modules/mongoose/tools/auth.js')
-rw-r--r-- | node_modules/mongoose/tools/auth.js | 30 |
1 files changed, 0 insertions, 30 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); -}); |