Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boringcodes/create-service
:airplane: Boring Express Microservice Generator - @boringcodes
https://github.com/boringcodes/create-service
backpack boringcodes cli docker eslint express husky lint-staged microservice mongo mongoose nvm postgres prettier sequelize standard-version typeorm typescript webpack yeoman
Last synced: about 2 months ago
JSON representation
:airplane: Boring Express Microservice Generator - @boringcodes
- Host: GitHub
- URL: https://github.com/boringcodes/create-service
- Owner: boringcodes
- License: mit
- Created: 2020-02-21T06:49:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T22:56:52.000Z (about 2 years ago)
- Last Synced: 2024-11-16T18:34:30.846Z (3 months ago)
- Topics: backpack, boringcodes, cli, docker, eslint, express, husky, lint-staged, microservice, mongo, mongoose, nvm, postgres, prettier, sequelize, standard-version, typeorm, typescript, webpack, yeoman
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/generator-create-service
- Size: 792 KB
- Stars: 5
- 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 service includes the following features:
- [x] [Express.js](https://expressjs.com)
- [x] [MongoDB](https://mongodb.com) ODM using [Mongoose](https://mongoosejs.com)
- [x] [PostgreSQL](https://www.postgresql.org) ORM using [Sequelize](https://sequelize.org), [TypeORM](https://typeorm.io) or [Prisma](https://www.prisma.io)
- [x] Code structure inspired by [Node.js Best Practices](https://github.com/goldbergyoni/nodebestpractices) & [Uncle Bob Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)Other features:
- [x] [Webpack](https://webpack.js.org) with [Typescript](https://www.typescriptlang.org) using [@boringcodes/backpack](https://github.com/boringcodes/backpack)
- [x] [Prettier](https://prettier.io) using [@boringcodes/prettier-config](https://github.com/boringcodes/prettier-config)
- [x] [ESLint](https://eslint.org) using [@boringcodes/eslint-config-typescript](https://github.com/boringcodes/eslint-config-typescript)
- [x] [Husky](https://github.com/typicode/husky)
- [x] [Lint Staged](https://github.com/okonet/lint-staged)
- [x] [NVM](https://github.com/nvm-sh/nvm)
- [x] [Dockerfile](https://docker.com)
- [x] [Standard Version](https://github.com/conventional-changelog/standard-version)## Install
Make sure `yeoman` is installed
```sh
$ yarn global add yo
```Then install the generator
```sh
$ yarn global add generator-create-service
```## Usage
Create a new directory
```sh
$ mkdir service-name
```Then navigate to the created directory and run the following command to generate source
```sh
$ yo create-service# or :with-mongo
$ yo create-service:with-mongo# or :with-postgres-sequelize
$ yo create-service:with-postgres-sequelize# or :with-postgres-typeorm
$ yo create-service:with-postgres-typeorm# or :with-postgres-prisma
$ yo create-service:with-postgres-prisma
```This scaffolds out:
```
├── .husky
├── src
│ ├── components
│ │ ├── index.ts
│ │ └── types.ts
│ ├── config
│ │ ├── index.ts
│ │ ├── mongo.ts (:with-mongo)
│ │ └── postgres.ts (:with-postgres-sequelize/:with-postgres-typeorm)
│ ├── db
│ │ ├── mongo.ts (:with-mongo)
│ │ ├── postgres.prisma (:with-postgres-prisma)
│ │ └── postgres.ts (:with-postgres-sequelize/:with-postgres-typeorm/:with-postgres-prisma)
│ ├── app.ts
│ └── index.ts
├── .dockerignore
├── .env.example
├── .gitignore
├── .nvmrc
├── Dockerfile
├── LICENSE
├── package.json
├── README.md
└── tsconfig.json
```To generate service component with full `CRUD` functions, please use [@boringcodes/create-service-component](https://github.com/boringcodes/create-service-component)
## 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/blob/master/LICENSE)