From 165f891686a9dd2fd0a31b98fdc477ba98fdf6e6 Mon Sep 17 00:00:00 2001 From: Kana Date: Fri, 22 Feb 2019 09:31:55 +0900 Subject: [PATCH] Update wizard.js --- src/wizard.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/wizard.js b/src/wizard.js index 3094488..2a6ec12 100644 --- a/src/wizard.js +++ b/src/wizard.js @@ -108,24 +108,34 @@ async function start() { query: 'Type a secure password for the root user:', handle: 'ADMIN_PASSWORD' }, + { + type: 'interactive', + query: 'Which predefined database do you want to use?', + handle: 'DB_CLIENT', + symbol: '>', + menu: [ + 'pg', + 'sqlite' + ] + }, { type: 'input', - query: 'Database host', + query: 'Database host (Ignore if you selected sqlite3):', handle: 'DB_HOST' }, { type: 'input', - query: 'Database user', + query: 'Database user (Ignore if you selected sqlite3):', handle: 'DB_USER' }, { type: 'input', - query: 'Database password', + query: 'Database password (Ignore if you selected sqlite3):', handle: 'DB_PASSWORD' }, { type: 'input', - query: 'Database name', + query: 'Database name (Ignore if you selected sqlite3):', handle: 'DB_DATABASE' } ]; @@ -138,7 +148,6 @@ async function start() { ROUTE_PREFIX: '/api', RATE_LIMIT_WINDOW: 2, RATE_LIMIT_MAX: 5, - DB_CLIENT: 'pg', BLOCKED_EXTENSIONS: ['.jar', '.exe', '.msi', '.com', '.bat', '.cmd', '.scr', '.ps1', '.sh'], UPLOAD_FOLDER: 'uploads', SECRET: randomstring.generate(64),