1.0.1 • Published 5 years ago

@kevinwang0316/redis-helper v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

RedisHelper

A helper to generate asynchronous client for Redis.

Build Status Coverage Status

Installing

npm install --save @kevinwang0316/redis-helper

Usage

// Node
const { createClient, getAsync, setAsync, quit, getClient } = require('@kevinwang0316/redis-helper');
// ES6
//import { createClient, getAsync, setAsync, quit, getClient } from '@kevinwang0316/redis-helper';

// Initialize the client before you use other functions
createClient('host', 'port', 'password');

// Set values
await setAsync('key', 'value');

// Get values
const value = await getAsync('key');

// Get Redis client
const client = getClient();

// Quit client
quit();

License

RedisHelper is licensed under MIT License - see the License file.