npm.io
1.1.0 • Published 6 years ago

nestjs-nats

Licence
MIT
Version
1.1.0
Deps
1
Size
13 kB
Vulns
0
Weekly
0

A module for utilizing ts-nats with NestJs

Installation

npm install nestjs-nats

(or yarn equivalent)

About Nats

This module is a thin layer on top of the NatsJS library.

Quick Start

To configure your NATS connection, import the Nats module using the familiar register() / registerAsync() pattern. Basically, you configure the module with at least a options object. These options objects map directly to the connection, configuration, and driver options in the ts-nats docs.

Once configured, inject the SINGLETON connection object into any service using the NATS_CONNECTION injection token.

Keywords