1.0.4 • Published 2 years ago

@t2tx/nestjs-package-random v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago