Socket
Book a DemoInstallSign in
Socket

@nest-cqrs/core

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nest-cqrs/core

The core module for the `nest-cqrs` framework.

latest
Source
npmnpm
Version
1.4.4
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@nest-cqrs/core

The core module for the nest-cqrs framework.

Usage

The core package provides a CQRSModule for working with the framework.

At the app module

@Module({
    imports: [
        CQRSModule.forRoot({
            applicationName: // global namespace of the application
            eventStoreConfig: // injectable configuration for the event store
        }),
    ]
})
export class AppModule {}

Notice the eventStoreConfig parameter. This is what enables support for multiple event stores in the background. Use the exported config object from another package (or make your own!) here and configure accordingly.

At the module level, inject the relevant providers via

@Module({
    imports: [
        CQRSModule.forFeature({
            namespace: // namespace for grouping related modules
        })
    ]
})
export class DomainMdoule {}

The namespace parameter here is crucial. All modules sharing the same namespace are treated as one client for listening to events. This means that different namespaces can process events at different rates depending on the processing requirements, freeing up compute resources and enabling native support for distributed systems.

FAQs

Package last updated on 01 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.