diff options
| author | Pitu <[email protected]> | 2020-12-27 05:16:21 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-12-27 05:16:21 +0900 |
| commit | b2ddfbc8a6244f727ca0c7a03fb2ccd4bc332b85 (patch) | |
| tree | b007c5ee2cb77bde3bb245de686de0c009b0b5a2 /src/setup.js | |
| parent | Merge pull request #229 from WeebDev/feat/docker (diff) | |
| download | host.fuwn.me-b2ddfbc8a6244f727ca0c7a03fb2ccd4bc332b85.tar.xz host.fuwn.me-b2ddfbc8a6244f727ca0c7a03fb2ccd4bc332b85.zip | |
Update admin password to be random
Diffstat (limited to 'src/setup.js')
| -rw-r--r-- | src/setup.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/setup.js b/src/setup.js index 4a9be7f..d3a151a 100644 --- a/src/setup.js +++ b/src/setup.js @@ -61,11 +61,6 @@ async function start() { 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?', handle: 'DB_CLIENT', @@ -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(); } |