@rush18/node-backend
v1.0.44
Published
Project generator: Express + TypeScript backend scaffold
Maintainers
Readme
Node Backend CLI
A modern, flexible, open-source backend project generator. Create full backend applications in seconds, powered by your choice of Express, Fastify, Hono, or NestJS.
Quick Start
npx @rush18/node-backend my-appYou will be prompted to choose:
- Language → TypeScript / JavaScript
- Module System → ESM (import/export) / CommonJS (require/module.exports)
- Template Style → Full (modern) / Simple (classic)
- Framework → Express / Fastify / Hono / NestJS
- Database → PostgreSQL (Prisma) / MongoDB (Mongoose) / None
- Extras → Docker Support / Prettier + ESLint / Testing (Vitest)
Skip prompts
npx @rush18/node-backend my-app --yesUse --install or -i to auto-install dependencies:
npx @rush18/node-backend my-app --installTemplate Styles
Full (recommended)
Modern architecture with config, middleware, utilities, types, and health check:
my-app/
├── src/
│ ├── config/ → Environment configuration (dotenv)
│ ├── middleware/ → Error handler, 404 handler
│ ├── routes/
│ │ ├── index.ts → Route mounting
│ │ └── health.ts → GET /health endpoint
│ ├── utils/ → Response helpers (success/error)
│ ├── types/ → Shared TypeScript types
│ ├── app.(ts|js) → App setup (CORS, middleware, routes)
│ └── server.(ts|js) → Server entry
├── .env.example
├── .gitignore
└── package.jsonSimple
Minimal classic structure with just the essentials:
my-app/
├── src/
│ ├── routes/
│ ├── app.(ts|js)
│ └── server.(ts|js)
├── .gitignore
└── package.jsonExtras
| Feature | Description |
|---|---|
| Docker Support | Generates Dockerfile + docker-compose.yml with health checks |
| Prettier + ESLint | Linting and formatting setup with lint script |
| Testing (Vitest) | Vitest config + sample test + test / test:watch scripts |
Run the Project
cd my-app
npm run devFor NestJS:
npm run start:devTests (if selected)
npm testLint (if selected)
npm run lintDocker
docker compose up --buildGenerated Docker files include a health check against /health.
License
MIT © 2024 @rush18
⭐ If you find this project useful, please star it on GitHub!
