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.

20 lines (17 loc) 521 B
// lib/setup.js import path from "path"; import { mkdirSync } from "fs"; import { installPackages } from "./installer.js"; import { writeFilesAndFolders } from "./writer.js"; export async function setupProject(answers) { const { projectName } = answers; const projectPath = path.join(process.cwd(), projectName); mkdirSync(projectPath, { recursive: true }); writeFilesAndFolders(projectPath, answers); await installPackages( projectPath, answers.language, answers.database, answers.orm ); }