Skip to content

boringcodes/create-service

Repository files navigation

create-service

Boring Express Microservice Generator

Features

Generated service includes the following features:

Other features:

Install

Make sure yeoman is installed

$ yarn global add yo

Then install the generator

$ yarn global add generator-create-service

Usage

Create a new directory

$ mkdir service-name

Then navigate to the created directory and run the following command to generate source

$ 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

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

License

MIT