/nestjs-generic-crud

NestJs Generic CRUD Library

Primary LanguageTypeScript

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

NestJs Generic CRUD A Simple CRUD Library for NestJs Framework

Using CrudService Example

# development
@Injectable()
export class UserService extends CrudService<User> {
  constructor(
    @InjectRepository(User)
    private readonly userRepository: Repository<User>,
  ) {
    super(userRepository);
  }
}

Using CrudController Example

@Controller('users')
export class UserController extends CrudController<User> {
  constructor(private readonly userService: UserService) {
    super(userService);
  }
}

License

NestJs Generic Crud is MIT licensed.