npm.io
7.0.0-alpha.10 • Published 8 months ago

@concepta/nestjs-otp

Licence
BSD-3-Clause
Version
7.0.0-alpha.10
Deps
3
Size
41 kB
Vulns
0
Weekly
0

Rockets NestJS Otp

A module for managing a basic Otp entity, including controller with full CRUD, DTOs, sample data factory and seeder.

Project

NPM Latest NPM Downloads GH Last Commit GH Contrib NestJS Dep

Installation

yarn add @concepta/nestjs-otp

Usage

import { Module } from '@nestjs/common';
import { TypeOrmExtModule } from '@concepta/nestjs-typeorm-ext';
import { OtpModule } from '@concepta/nestjs-user';
import { CrudModule } from '@concepta/nestjs-crud';

@Module({
  imports: [
    TypeOrmExtModule.forRoot({
      type: 'postgres',
      url: 'postgres://user:pass@localhost:5432/postgres',
    }),
    CrudModule.forRoot({}),
    OtpModule.forRootAsync({
      imports: [
        TypeOrmExtModule.forFeature({
          otp: {
            entity: YourOtpEntity,
          },
        }),
      ],
      useFactory: () => ({}),
      entities: ['otp'],
    }),
  ],
})
export class AppModule {}

Configuration

Seeding

Configurations specific to (optional) database seeding.

ENV

Configurations available via environment.

Variable Type Default
ORG_MODULE_SEEDER_AMOUNT <number> 50 number of additional users to create