2.0.3 • Published 9 months ago

nest-generic-services v2.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Nest Generic Services

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm i nest-generic-services

Quick Start

  1. Add module in your AppModule
@Module({
  imports: [
    GenericServicesModule.register()
  ],
})
export class AppModule {
}
  1. Create a new nest project using the command nest new proyect-name.
  2. Install de library using the npm install command:
  3. Create your entities in your project and extends the class BaseEntity
export class UserEntity extends BaseEntity {
}
  1. Create your dto in your project.
  2. Create your services in your project and extends the class BaseService
export class UserService extends BaseService<UserEntity, UserDto> {
}
  1. Create your controllers in your project and extends the class CustomResponseBaseController or DefaultResponseBaseController
export class UserController1 extends CustomResponseBaseController<UserEntity, UserService, UserDto, ResponseDto> {
}
export class UserController2 extends DefaultResponseBaseController<UserEntity, UserService,UserDto> {
}