Skip to content

Commit 34f6136

Browse files
committed
feat: publish
1 parent ff89ed2 commit 34f6136

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ your [NestJS](https://nestjs.com/) applications. With Nest Events, you can easil
55
application, making it simpler to implement various communication patterns and workflows.
66

77
It's the same as `@nestjs/event-emitter` but allowing you to implement your own emitter, like AWS SNS, RabbitMQ, etc.
8-
A default emitter is already provided by default using EventEmitter2.
8+
A default emitter is already provided by default using [EventEmitter2](https://github.com/EventEmitter2/EventEmitter2).
99

1010
## Installation
1111

@@ -137,14 +137,21 @@ export class MyListener {
137137

138138
## Configuration
139139

140-
The `EventBusModule.forRoot()` method accepts an optional configuration object. Here's an example of how to use it:
140+
The `EventBusModule.forRoot()` method accepts an optional configuration object.
141+
See [EventEmitter2](https://github.com/EventEmitter2/EventEmitter2) for more configuration options details.
142+
Here's an example of how to use it:
141143

142144
```typescript
143145
import { Module } from '@nestjs/common';
144146
import { EventBusModule } from 'nest-events';
145147

146148
@Module({
147-
imports: [EventBusModule.forRoot({ global: false })],
149+
imports: [
150+
EventBusModule.forRoot({
151+
global: true // Set to "true" (default) to register as a global module
152+
/* Additional configuration options from eventemitter2 can be added here */
153+
})
154+
]
148155
})
149156
export class AppModule {}
150157
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nest-events",
3-
"version": "0.0.4",
3+
"version": "2.0.0",
44
"private": false,
55
"license": "MIT",
66
"repository": {

0 commit comments

Comments
 (0)