Skip to content

Repository files navigation

RED

Minimalistic Redis client for Node.js

Credits

Red is a fork of djanowski/yoredis. Many thanks to Damian Janowski and his great work.

Installation

Requirements

  • Node.js >= 8.0.0
  • Redis

Instructions

  • With npm:
npm i @albert-team/red
  • With yarn:
yarn add @albert-team/red

Usage

Quick Start

constRed=require('@albert-team/red')constmain=async()=>{constclient=newRed('127.0.0.1',6379)console.log(client.ready)// falseawaitclient.connect()console.log(client.ready)// trueconsole.log(awaitclient.call('PING'))// PONGconsole.log(awaitclient.callOne(['GET','key1']))// nullconsole.log(awaitclient.callMany([['SET','key1','val1'],['GET','key1'],['GET','key2']]))// [ 'OK', 'val1', null ]console.log(client.disconnected)// falseawaitclient.disconnect()console.log(client.disconnected)// true}main()

Authentication

You can either pass the password to the constructor

constclient=newRed('127.0.0.1',6379,{password: 'scrtpassword'})

or call this method manually

client.authenticate('scrtpassword')

Changelog

Read more here.

About

Minimalistic Redis client for Node.js

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages