1.0.0-beta.0 • Published 3 years ago

nestjs-type-events v1.0.0-beta.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Installation

$ yarn add type-events nestjs-type-events

Basic usage

app.module.ts

import { Module } from "@nestjs/common";
import { TypeEventsModule } from 'nestjs-type-events';
import { DogsModule } from "./dog.module.ts";

@Module({
  imports: [
    TypeEventsModule.forRoot(),
    DogsModule
  ]
})
export class AppModule {}

dog.module.ts

import { Module } from '@nestjs/common';
import { TypeEventsModule } from 'nestjs-type-events';
import { HelloController } from './hello.controller';
import { HelloService } from './hello.service';
import { HelloSubscriber } from './subscribers/hello.subscriber';

@Module({
  imports: [TypeEventsModule.forFeature([HelloSubscriber])],
  controllers: [HelloController],
  providers: [HelloService, HelloSubscriber]
})
export class HelloModule {}

See tests/src for full example.

Test

# e2e tests
$ npm run test:e2e

Stay in touch

License

nestjs-type-events is MIT licensed.