Browse Source

Demo: out comment mong.js; changes for remote mongoDB

developer
Erik Römmelt 2 years ago
parent
commit
84e73466e1
2 changed files with 8 additions and 8 deletions
  1. 6
    6
      mong.js
  2. 2
    2
      mong_usr.js

+ 6
- 6
mong.js View File

@@ -1,13 +1,13 @@
var db = db.getSiblingDB('omdb');
var db = db.getSiblingDB('om');

// Delete all collections + all records
db.messages.deleteMany({});
db.tags.deleteMany({});
db.users.deleteMany({});
db.sessions.deleteMany({});
//db.messages.deleteMany({});
//db.tags.deleteMany({});
//db.users.deleteMany({});
//db.sessions.deleteMany({});

// Insert data in collections
load('mong_msg.js');
//load('mong_msg.js');
load('mong_tag.js');
load('mong_usr.js');


+ 2
- 2
mong_usr.js View File

@@ -1,8 +1,8 @@
db.users.insert([
// User: author, Pwd: author
{"_id":"author","name":"Author","type":"MA@EFI;","roles":'{"user":true,"author":true}',"hash":"sha256","salt":"SIzKNsNKsCRVr8a9U90q6A==","pwd":"HZly68TSAKHioz6Kz0QCbXVTHpT6hMmabUbFYVlCMeE=","abos":["nulla","tempor","veniam","ipsum"],"bookmarks":[],},
{"_id":"author","name":"Author","type":"PF@EFI;","roles":'{"user":true,"author":true}',"hash":"sha256","salt":"SIzKNsNKsCRVr8a9U90q6A==","pwd":"HZly68TSAKHioz6Kz0QCbXVTHpT6hMmabUbFYVlCMeE=","abos":[],"bookmarks":[],},
// User: admin, Pwd: SwenMho
{"_id":"admin","name":"Test Admin","type":"MA@AMP;","roles":'{"user":true,"author":true,"admin":true}',"hash":"sha256","salt":"z3PNXGmQaWvaT7m2ZlT+0w==","pwd":"nfUfNv032J745xj3Hzya3Mkk43Dz/H0BmNTZhtx8UM0=","abos":["veniam","ipsum"],"bookmarks":[],},
// {"_id":"admin","name":"Test Admin","type":"MA@AMP;","roles":'{"user":true,"author":true,"admin":true}',"hash":"sha256","salt":"z3PNXGmQaWvaT7m2ZlT+0w==","pwd":"nfUfNv032J745xj3Hzya3Mkk43Dz/H0BmNTZhtx8UM0=","abos":["veniam","ipsum"],"bookmarks":[],},
])

//var c = require('./server/crypto.js'),

Loading…
Cancel
Save