db = require("./redis") bcrypt = require('bcryptjs') db.get("user:admin", (err, res) -> if !res bcrypt.hash('admin', 12, (err, hash) -> db.sadd("users","user:admin") db.hmset("user:admin", username: 'admin' password: hash, , -> console.log("Created admin user with password 'admin'") process.exit() ) ) )
aboutsummaryrefslogtreecommitdiffstats
path: root/ecosystem.config.js
blob: bd14074f5a587f2268793204853d0693d860b9ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17