(function() { var bcrypt, db; db = require("./redis"); bcrypt = require('bcryptjs'); db.get("user:admin", function(err, res) { if (!res) { return bcrypt.hash('admin', 12, function(err, hash) { db.sadd("users", "user:admin"); return db.hmset("user:admin", { username: 'admin', password: hash }, function() { console.log("Created admin user with password 'admin'"); return process.exit(); }); }); } }); }).call(this); ='header'> cgit logo index : coinos-server.git
coinos server — legacy coinos.io backend (Lightning, on-chain, Liquid)coinos
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/api.js.map
blob: 7b03f30a93fe6200f66e68059f9630c3fc90ad01 (plain) (blame)
1