express-controller-generator
v1.0.0
Published
Auto-generate Express controllers with proper folder structure
Downloads
9
Maintainers
Readme
Express Controller Generator
Auto-generate Express controllers with proper folder structure.
Installation
npm install -g express-controller-generator
This will generate:
- Controllers with CRUD operations
- Route files
- Proper folder structure based on your existing project
Generated Structure
Controllers structure (if src/controllers exists):
src/
├── controllers/
│ └── users/
│ ├── createUserController.js
│ ├── updateUserController.js
│ ├── getUserController.js
│ ├── deleteUserController.js
│ ├── listUsersController.js
│ └── index.js
└── routes/
└── users.js
Features
- ✅ Auto-detects existing project structure
- ✅ CommonJS format with GeneralApiResponse
- ✅ RESTful route setup
- ✅ Error handling built-in
- ✅ Won't overwrite existing files
License
MIT
