create-node-app-cli: A CLI tool to scaffold a Node.js project with integrated database, ORM, and optional TypeScript support. Supports frameworks like Express, Fastify, and Nest with built-in Swagger docs setup.
MIT License
create-node-app-cli
is a powerful CLI tool that helps developers quickly scaffold a Node.js project with integrated database configuration, ORM setup, and optional TypeScript support. The tool also includes support for popular frameworks such as Express, Fastify, and Nest, as well as built-in Swagger documentation configuration for API development.
.env
sample file for setting up environment variables.Make sure you have the following installed:
You can install create-node-app-cli
via npx, yarn, or pnpm:
npx create-node-app-cli@latest
yarn create create-node-app-cli
pnpm dlx create-node-app-cli@latest
After running the command, follow the prompts to configure your project you'll be asked to select: Framework: Express, Fastify, or Nest. Database: MongoDB, PostgreSQL, or MySQL. ORM: Mongoose, Prisma, or DrizzleORM. TypeScript or JavaScript.
The CLI generates a project with the following folder structure
my-app/
│
├── src/
│ ├── controllers/
│ ├── routes/
│ ├── mails/
│ ├── middleware/
│ ├── services/
│ ├── schemas/
│ ├── swagger-docs/
│ │ ├── swagger-api-docs/
│ │ └── swagger-schema-docs/
│ └── utils/
│
├── .env.sample
├── .gitignore
├── package.json
├── tsconfig.json (if using TypeScript)
└── README.md
The project includes built-in Swagger documentation configuration to help you document and visualize your API. By default, the Swagger docs are available at:
/api-docs
You can configure your environment by copying the .env.sample file to .env and setting the appropriate values for your project.
cp .env.sample .env
Here are some useful npm scripts to help you manage the project:
Start the development server:
npm run dev
Build the project:
npm run build
Lint your code:
npm run lint
Contributions are welcome! Please follow these steps:
This project is licensed under the MIT License - see the LICENSE file for details.