create-kd-node-app
v1.0.0
Published
Scaffold a production-ready Node.js + TypeScript project
Maintainers
Readme
create-node-app
Scaffold a production-ready Node.js + TypeScript project in seconds.
Usage
npx create-node-app <project-name>Example
npx create-node-app my-api
cd my-api
npm run devWhat's included
my-api/
├── bin/
│ └── www.ts # HTTP server bootstrap
├── controller/
│ └── base.controller.ts # Base controller with response helpers
├── helper/
│ ├── logger.ts # Winston logger (with daily rotate in prod)
│ └── response.ts # Standard API response helpers
├── locales/
│ ├── en.json # English translations
│ ├── gu.json # Gujarati translations
│ └── hi.json # Hindi translations
├── model/
│ └── base.model.ts # Mongoose base model + soft delete plugin
├── routes/
│ └── index.ts # Route entry point
├── seeder/
│ └── index.ts # DB seeder bootstrap
├── services/
│ └── base.service.ts # Generic CRUD base service
├── app.ts # Express app setup
├── tsconfig.json
├── .env.example
├── .eslintrc.json
└── .gitignoreScripts
| Command | Description |
|---------|-------------|
| npm run dev | Start dev server with hot-reload (ts-node-dev) |
| npm run build | Compile TypeScript to dist/ |
| npm start | Run compiled production build |
| npm run lint | Lint TypeScript files |
| npm run lint:fix | Auto-fix lint issues |
Dependencies
| Package | Purpose |
|---------|---------|
| express | Web framework |
| dotenv | Environment variables |
| cors | CORS middleware |
| helmet | Security headers |
| mongoose | MongoDB ODM |
| i18n | Internationalization (en, gu, hi) |
| winston | Logging |
| winston-daily-rotate-file | Log rotation |
| http-status-codes | HTTP status code constants |
| express-validator | Request validation |
Publishing to npm
# Login to npm
npm login
# Publish
npm publish --access publicAfter publishing, anyone can run:
npx create-node-app my-project