@nitra/keyv

1.0.1 • Public • Published

@nitra/keyv

Keyv Redis Integration

This project provides a simple setup for using the Keyv library with Redis or an in-memory store, depending on the environment (production or local development).

Features

  • Redis as a store: In production, the store uses Redis for caching or storing data.
  • In-memory store: In local development, it can default to an in-memory store if Redis is not available.
  • Environment variable checks: The project uses @nitra/check-env to ensure necessary environment variables are defined.
  • Error handling: Any connection errors are logged using an event listener.

Requirements

  • Node.js
  • Redis (for production)

Installation

To install the library, run:

yarn add @nitra/keyv
# or
npm install @nitra/keyv

Configuration

Set the Redis connection string and namespace in the environment variables:

REDIS_CONN=redis://user:password@localhost:6379
KEYV_NAMESPACE=your-namespace

Readme

Keywords

Package Sidebar

Install

npm i @nitra/keyv

Weekly Downloads

45

Version

1.0.1

License

MIT

Unpacked Size

2.16 kB

Total Files

3

Last publish

Collaborators

  • vitaliytv