feat: use env var `ADMIN_PASSWORD` for default
This commit is contained in:
parent
556dfbd5f5
commit
82ecaeb5a1
|
@ -9,7 +9,7 @@
|
|||
"url": "https://github.com/Pitu"
|
||||
},
|
||||
"scripts": {
|
||||
"setup": "node src/setup.js && npm run migrate && npm run seed",
|
||||
"setup": "cross-env node src/setup.js && cross-env npm run migrate && cross-env npm run seed",
|
||||
"start": "npm run migrate && nuxt build && cross-env NODE_ENV=production node src/api/structures/Server",
|
||||
"dev": "nodemon src/api/structures/Server",
|
||||
"migrate": "knex migrate:latest",
|
||||
|
|
|
@ -33,7 +33,7 @@ exports.seed = async db => {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
const hash = await bcrypt.hash('admin', 10);
|
||||
const hash = await bcrypt.hash(process.env.ADMIN_PASSWORD, 10);
|
||||
await db.table('users').insert({
|
||||
username: 'admin',
|
||||
password: hash,
|
||||
|
|
Loading…
Reference in New Issue