Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report

redis 4.6.13

A modern, high performance Redis client
Package summary
Share
0
issues
0
licenses
Package created
30 Dec 2010
Version published
5 Feb 2024
Maintainers
4
Total deps
0
Direct deps
0
License
MIT
Generating a report...
Hold on while we generate a fresh audit report for this package.

Frequently Asked Questions

What does redis do?

Redis is a modern, high performance client for Redis that operates within a Node.js environment. It allows for quick and efficient interaction with a Redis database, offering built-in support for all out-of-the-box Redis commands. Node-Redis provides a platform for developers to interact with Redis using JavaScript, allowing for fast data handling, and efficient caching and storage solutions.

How do you use redis?

To use Redis within your Node.js applications, you first need to install it using npm with the command npm install redis. After installation, you can import the redis module and create a new client using createClient(). Here is a basic usage example:

import { createClient } from 'redis';

const client = await createClient()
  .on('error', err => console.log('Redis Client Error', err))
  .connect();

await client.set('key', 'value');
const value = await client.get('key');
await client.disconnect();

This example involves connecting to a local Redis server on port 6379, setting a key-value pair, retrieving the value of the key, and then disconnecting from the server.

Where are the redis docs?

The documentation for Redis can be found on multiple urls depending on the particular package. For instance, the documentation for the @redis/client package can be found at https://redis.js.org/documentation/client/. Other packages like @redis/bloom, @redis/graph, @redis/json, and @redis/search have their specific documentation as mentioned in the provided README file. This comprehensive documentation covers everything from setting up the client, to handling connections, running commands, using transactions, and more.