@laiyon/create-wasapi
Version:
CLI to create WhatsApp bot projects with Wasapi and BuilderBot
37 lines (36 loc) • 989 B
JavaScript
import chalk from "chalk";
import inquirer from "inquirer";
export const configBDRelational = async (dbType) => {
const configBD = await inquirer.prompt([
{
type: "input",
name: "host",
message: chalk.blue("🏠 Database host:"),
default: "localhost"
},
{
type: "input",
name: "port",
message: chalk.blue("🔌 Port:"),
default: dbType === "mysql" ? "3306" : "5432"
},
{
type: "input",
name: "user",
message: chalk.blue("👤 Username:"),
default: "root"
},
{
type: "password",
name: "password",
message: chalk.blue("🔒 Password:")
},
{
type: "input",
name: "database",
message: chalk.blue("📁 Database name:"),
default: "laiyonWasapi_db"
}
]);
return configBD;
};