@t2tx/nestjs-package-random
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

NestJS npm Package Random

Installation

yarn

yarn add @t2tx/nestjs-package-random

npm

npm i @t2tx/nestjs-package-random

Usage

app.module.ts

import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { RandomNumberModule } from '@t2tx/nestjs-package-random';

@Module({
  imports: [RandomNumberModule.forRoot()],
  controllers: [AppController],
})
export class AppModule {}

app.controller.ts

import { Controller, Get } from '@nestjs/common';
import { RandomNumberService } from '@t2tx/nestjs-package-random';

@Controller()
export class AppController {
  constructor(private readonly random: RandomNumberService) {}
  @Get()
  getHello(): string {
    return `Hello! ${this.random.generate()}`;
  }
}

Change Log

See Changelog for more information.

Contributing

Contributions welcome! See Contributing.

License

Licensed under the MIT License - see the LICENSE file for details.

Package Sidebar

Install

npm i @t2tx/nestjs-package-random

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

12.7 kB

Total Files

26

Last publish

Collaborators

  • t2tx