UNPKG

nim-nodex-init

Version:

nim-nodex-init is a powerful CLI tool that scaffolds a complete Node.js & Express.js app with your preferred database, ORM, authentication system, and organized folder structure β€” all in seconds.

37 lines (33 loc) β€’ 952 B
#!/usr/bin/env node import inquirer from "inquirer"; import { setupProject } from "../lib/setup.js"; console.log("πŸ› οΈ Welcome to nodex-init!"); const answers = await inquirer.prompt([ { type: "input", name: "projectName", message: "Project name:" }, { type: "list", name: "language", message: "Use JavaScript or TypeScript?", choices: ["JavaScript", "TypeScript"], }, { type: "list", name: "database", message: "Choose a database:", choices: ["MongoDB", "MySQL", "PostgreSQL"], }, { type: "list", name: "orm", message: "Choose an ORM:", choices: (answers) => { return answers.database === "MongoDB" ? ["Mongoose"] : ["Sequelize", "Prisma"]; }, }, ]); await setupProject(answers); console.log("βœ… Project setup complete!"); console.log("πŸš€Edit your .env file with your database credentials"); console.log("πŸš€ Run 'npm start dev' to start the server");