@purista/nats-config-store
TypeScript icon, indicating that this package has built-in type declarations

1.11.0 • Public • Published

@purista/nats-config-store

A config store for using NATS (with JetStream) as storage.
JetStream must be enabled at the NATS broker.

const config = {
  port: 8222
}

const store = new NatsConfigStore( config )

await store.setConfig('configKey',{ myConfig: 'value' })

let value = await store.getConfig('configKey')
console.log(value) // outputs: { configKey: { myConfig: 'value' } }

await store.removeConfig('configKey')

value = await store.getConfig('configKey')
console.log(value) // outputs: undefined

See documentation of underlaying redis lib package for detailed configuration options - NODE-REDIS.

Visit purista.dev

Follow on Twitter @purista_js
Join the Discord Chat

PURISTA - Typescript framework for IoT, microservices, and serverless | Product Hunt

Readme

Keywords

none

Package Sidebar

Install

npm i @purista/nats-config-store

Homepage

purista.dev

Weekly Downloads

70

Version

1.11.0

License

ISC

Unpacked Size

21.3 kB

Total Files

34

Last publish

Collaborators

  • sebastianwessel