Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-nats

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-nats

Fastify nats plugin

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-84.62%
Maintainers
1
Weekly downloads
 
Created
Source

fastify-nats

js-standard-style npm version npm downloads

NATS Server is a simple, high performance open source messaging system for cloud native applications, IoT messaging, and microservices architectures.

Under the hood NATS client is used, the options that you pass to register will be passed to the nats client.

Install

npm i fastify-nats --save

Usage

Add it to you project with register and you are done!
You can access the nats Connection via fastify.nats.

const fastify = require('fastify')

fastify.register(require('fastify-nats'), {
  url: 'nats:demo.nats.io:4222'
}, err => {
  if (err) throw err
})

fastify.listen(3000, err => {
  if (err) throw err
  console.log(`server listening on ${fastify.server.address().port}`)
})

and later

fastify.nats.publish(topic, message);

License

Licensed under MIT.

Keywords

FAQs

Package last updated on 06 Dec 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc