npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@am92/redis

v3.0.1

Published

Redis SDK

Downloads

37

Readme

@am92/redis

npm version  Security: Snyk  License: MIT  Downloads Bundle Size

This is an SDK wrapper that simplifies interaction with a Redis instance by providing convenient Redis functionalities. It is built on top of the Node-Redis package (v4.7.x).

For full documentation, visit here.

Table of Content

Installation

npm install --save @am92/redis

Environment Variables

The following environment variables need to be set to work with this package:

##### Redis Config
export REDIS_ENABLED=false
export REDIS_AUTH_ENABLED=false
export REDIS_HOST=
export REDIS_PORT=
export REDIS_AUTH=
export REDIS_KEY_PREFIX=
export REDIS_PING_INTERVAL=

| Variable Name | Required | Default | Description | | --------------------- | -------- | ------------------------ | ------------------------------------- | | REDIS_ENABLED | No | false | Enables/Disables Redis functionality | | REDIS_AUTH_ENABLED | No | false | Enables/Disables Redis authentication | | REDIS_HOST | No* | - | Redis server host address | | REDIS_PORT | No* | - | Redis server port number | | REDIS_AUTH | No** | - | Redis authentication password | | REDIS_KEY_PREFIX | No | - | Prefix to be added to all Redis keys | | REDIS_PING_INTERVAL | No | 1800000 (30 minutes) | Ping interval in milliseconds |

Note:

  • * - Required fields if REDIS_ENABLED is set to true.
  • ** - Required fields if REDIS_AUTH_ENABLED is set to true.

Creating an Instance

import { RedisSdk } from '@am92/redis'

const redisSdk = new RedisSdk()

export default redisSdk

Note: You do not need to set any environment variables if you wish to pass your own config.

Self-managed Config

If you wish to pass your custom 'config' for the RedisSdk, then you can avoid setting any environment variables defined above and pass your own redis config as follows:

import { RedisSdk } from '@am92/redis'

const config = {
  CONNECTION_CONFIG: {
    socket: {
      host: '',
      port: 6379,
      tls: true
    },
    password: '',
    pingInterval: 0
  },
  KEY_PREFIX: ''
}

const redisSdk = new RedisSdk(config)

export default redisSdk

Connection Management

To manage redis connections for RedisSdk Instances, connect and disconnect methods are provided and they can be called as shown below. The connect method must be called before before using the RedisSdk Methods.

// To establish a connection
await redisSdk.connect()

// To release the connection
await redisSdk.disconnect()

// To force release the connection
await redisSdk.disconnect(true)

Contributors

Resources

License