enacom-rest-gen
v1.0.7
Published
This Yeoman generator simplifies the process of creating RESTful API services by scaffolding out the necessary files and configurations. It automates the creation of controllers, routes, use cases, and optionally, schema models, adhering to best practices
Downloads
12
Readme
Yeoman Enacom Generator for REST APIs
This Yeoman generator simplifies the process of creating RESTful API services by scaffolding out the necessary files and configurations. It automates the creation of controllers, routes, use cases, and optionally, schema models, adhering to best practices.
Features
- Generate REST API boilerplate with customizable endpoints.
- Supports CRUD operations (Create, Read, Update, Delete).
- Dynamic creation based on user input during the generation process.
- Option to generate data models with user-defined fields.
- Integrated response and error handling utilities.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js (>= 12.x)
- npm or yarn
- Yeoman CLI (
npm install -g yo
)
Installation
First, install this generator using npm:
npm install -g enacom-rest-gen
To use:
yo enacom-rest:api
The generated structure:
src/
├── api/
│ ├── [api-name]/
│ │ ├── controllers/
│ │ ├── routes/
│ │ ├── useCases/
│ │ └── tests/
│ └── schemas/