- Generate full CRUD component (list, create, get, updatePartial, update & delete)
- Auto register the new created component to express routes
Make sure yeoman is installed
$ yarn global add yoThen install the generator
$ yarn global add generator-create-service-componentNavigate to the created service (using @boringcodes/create-service) root dir and run the following command to generate new component
$ yo create-service-component
# or with mongo
$ yo create-service-component:with-mongoThis scaffolds out:
├── src
│ ├── components
│ │ ├── component-names
│ │ │ ├── constants.ts
│ │ │ ├── controller.ts
│ │ │ ├── index.ts
│ │ │ ├── model.ts (:with-mongo)
│ │ │ ├── repository.ts (:with-mongo)
│ │ │ ├── types.ts
│ │ └── ...
│ ├── ...
├── ...
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
