nestjs-type-events
A type-events module for Nest.js.
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
$ npm run test:e2e
Stay in touch
License
nestjs-type-events
is MIT licensed.