Initial Commit

This commit is contained in:
2020-07-08 15:37:09 +02:00
commit 549ecd137f
1746 changed files with 292109 additions and 0 deletions

30
node_modules/mongoose/tools/auth.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
'use strict';
const Server = require('mongodb-topology-manager').Server;
const co = require('co');
const mongodb = require('mongodb');
co(function*() {
// Create new instance
var 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);
});