spee.ch/cli/questions/mysqlQuestions.js

35 lines
777 B
JavaScript
Raw Permalink Normal View History

2018-08-01 01:01:16 +02:00
const database = (defaultAnswer) => {
return {
type : 'input',
message: 'What is the name of the MySQL DATABASE to be used?',
default: defaultAnswer,
name : 'database',
};
};
const username = (defaultAnswer) => {
return {
type : 'input',
message: 'What is the USER NAME for your MySQL database?',
default: defaultAnswer,
name : 'username',
};
};
const password = (defaultAnswer) => {
return {
type : 'input',
message: 'What is the PASSWORD for your MySQL database?',
default: defaultAnswer,
name : 'password',
};
};
module.exports = (defaultDatabase, defaultUsername, defaultPassword) => {
return [
database(defaultDatabase),
username(defaultUsername),
password(defaultPassword),
];
};