express-typescript-starter-cli
v1.0.0
Published
CLI tool to scaffold Express.js + TypeScript + MongoDB starter project with best practices
Maintainers
Readme
🚀 Express TypeScript Starter CLI
CLI tool to scaffold a production-ready Express.js + TypeScript + MongoDB starter project
Create a new Express backend app with one command!
✨ Features
- ✅ Express.js with TypeScript
- ✅ MongoDB with Mongoose
- ✅ MVC folder structure
- ✅ Environment configuration
- ✅ Error handling & logging
- ✅ Security middleware (Helmet, CORS)
- ✅ Example routes & controllers
- ✅ Dummy data seeding
- ✅ Production-ready setup
🚀 Quick Start
Using npx (Recommended)
npx express-typescript-starter-cli my-appUsing npm
npm create express-ts-app my-appUsing yarn
yarn create express-ts-app my-appUsing pnpm
pnpm create express-ts-app my-app📦 What's Included?
The generated project includes:
my-app/
├── src/
│ ├── config/ # Configuration (database, env)
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Custom middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── scripts/ # Utility scripts (seed data)
│ ├── types/ # TypeScript types
│ ├── utils/ # Helper functions
│ ├── app.ts # Express app setup
│ └── server.ts # Server entry point
├── .env.example # Environment variables template
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md🛠️ Usage
After creating your app:
cd my-app
# Setup environment variables
cp .env.example .env
# Start development server
npm run dev
# Optional: Seed dummy data
npm run seed📝 Available Scripts
npm run dev- Start development server with hot reloadnpm run build- Build TypeScript to JavaScriptnpm start- Run production servernpm run seed- Seed database with dummy data
🔧 Prerequisites
- Node.js >= 18.0.0
- MongoDB (local or Atlas)
📚 Tech Stack
- Express.js - Web framework
- TypeScript - Type safety
- MongoDB - Database
- Mongoose - ODM
- tsx - TypeScript execution
- Helmet - Security headers
- CORS - Cross-origin resource sharing
- Compression - Response compression
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📄 License
MIT © Rdrudra99
🐛 Issues
Found a bug? Please create an issue at GitHub Issues
📧 Contact
- GitHub: @Rdrudra99
- Email: [email protected]
Made with ❤️ for developers
