Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boringcodes/create-service-component
:airplane: Boring Express Microservice Component Generator - @boringcodes
https://github.com/boringcodes/create-service-component
backpack boringcodes cli eslint express husky lint-staged microservice mongo mongoose nvm postgres prettier sequelize standard-version typeorm typescript yeoman
Last synced: 2 months ago
JSON representation
:airplane: Boring Express Microservice Component Generator - @boringcodes
- Host: GitHub
- URL: https://github.com/boringcodes/create-service-component
- Owner: boringcodes
- License: mit
- Created: 2020-03-23T07:24:11.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T22:56:57.000Z (about 2 years ago)
- Last Synced: 2024-11-28T19:12:00.521Z (2 months ago)
- Topics: backpack, boringcodes, cli, eslint, express, husky, lint-staged, microservice, mongo, mongoose, nvm, postgres, prettier, sequelize, standard-version, typeorm, typescript, yeoman
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/generator-create-service-component
- Size: 724 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Features
Generated component includes the following features:
- [x] Generate full CRUD component (list, create, get, update & delete)
- [ ] Auto register the new created component to express routes## Install
Make sure `yeoman` is installed
```sh
$ yarn global add yo
```Then install the generator
```sh
$ yarn global add generator-create-service-component
```## Usage
Navigate to the created service (using [@boringcodes/create-service](https://github.com/boringcodes/create-service)) root dir and run the following command to generate new component
```sh
$ yo create-service-component# or :with-mongo
$ yo create-service-component:with-mongo# or :with-postgres-sequelize
$ yo create-service-component:with-postgres-sequelize# or :with-postgres-typeorm
$ yo create-service-component:with-postgres-typeorm# or :with-postgres-prisma
$ yo create-service-component:with-postgres-prisma
```This scaffolds out:
```
├── src
│ ├── components
│ │ ├── component-names
│ │ │ ├── constants.ts
│ │ │ ├── controller.ts
│ │ │ ├── index.ts
│ │ │ ├── model.ts (:with-mongo/:with-postgres-sequelize/:with-postgres-typeorm)
│ │ │ ├── repository.ts (:with-mongo/:with-postgres-sequelize/:with-postgres-typeorm/:with-postgres-prisma)
│ │ │ ├── types.ts
│ │ └── ...
│ ├── ...
├── ...
```## Contributing
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.
## Authors
[BoringCodes](https://github.com/boringcodes)
## License
[MIT](https://github.com/boringcodes/create-service-component/blob/master/LICENSE)