Update admin password to be random
This commit is contained in:
parent
2737eb5c2c
commit
b2ddfbc8a6
15
src/setup.js
15
src/setup.js
|
@ -60,11 +60,6 @@ async function start() {
|
|||
query: 'Name of the admin account?',
|
||||
handle: 'ADMIN_ACCOUNT'
|
||||
},
|
||||
{
|
||||
type: 'secure',
|
||||
query: 'Type a secure password for the admin account:',
|
||||
handle: 'ADMIN_PASSWORD'
|
||||
},
|
||||
{
|
||||
type: 'interactive',
|
||||
query: 'Which predefined database do you want to use?',
|
||||
|
@ -102,6 +97,7 @@ async function start() {
|
|||
let envfile = '';
|
||||
|
||||
const defaultSettings = {
|
||||
ADMIN_PASSWORD: randomstring.generate(16),
|
||||
GENERATED_FILENAME_LENGTH: 12,
|
||||
GENERATED_ALBUM_LENGTH: 6,
|
||||
WEBSITE_PORT: 5001,
|
||||
|
@ -132,9 +128,12 @@ async function start() {
|
|||
jetpack.dir('database');
|
||||
|
||||
console.log();
|
||||
console.log('=============================================');
|
||||
console.log('== .env file generated successfully. ==');
|
||||
console.log('=============================================');
|
||||
console.log('====================================================');
|
||||
console.log('== .env file generated successfully. ==');
|
||||
console.log('====================================================');
|
||||
console.log(`== Your admin password is: ${defaultSettings.ADMIN_PASSWORD} ==`);
|
||||
console.log('== MAKE SURE TO CHANGE IT AFTER YOUR FIRST LOGIN! ==');
|
||||
console.log('====================================================');
|
||||
console.log();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue