Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitcoin-api/drf
drf - Do Redis Function
https://github.com/bitcoin-api/drf
async function helper javascript node nodejs promise redis
Last synced: about 2 months ago
JSON representation
drf - Do Redis Function
- Host: GitHub
- URL: https://github.com/bitcoin-api/drf
- Owner: bitcoin-api
- License: bsd-3-clause
- Created: 2020-07-21T22:12:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T18:22:28.000Z (over 3 years ago)
- Last Synced: 2024-08-09T03:26:00.260Z (5 months ago)
- Topics: async, function, helper, javascript, node, nodejs, promise, redis
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: funding.yml
- License: LICENSE
Awesome Lists containing this project
README
# drf
[![npm version](https://badge.fury.io/js/drf.svg)](https://badge.fury.io/js/drf)
### Dr. F - Do Redis Function
## About
Fast access to redis functionality. Great to use in combination with [do-redis-request](https://github.com/bitcoin-api/do-redis-request).
## Installation
```
npm install drf --save
```## Set Up
Your Redis URL can be set using the environment variable `process.env.REDIS_URL`. The default Redis URL is `127.0.0.1:6379`.## Example
```.js
'use strict';const drf = require( 'drf' );
const doRedisRequest = require( 'do-redis-request' );(async () => {
const drfResponse = await drf({
redisFunction: async ({
redisClient
}) => {
const redisValue = await doRedisRequest({
client: redisClient,
command: 'get',
redisArguments: [ 'redisKey' ],
});return redisValue;
},functionName: 'test function'
});console.log( 'Redis Value:', drfResponse );
})();
```### Module Created by [Bitcoin-Api.io](https://bitcoin-api.io)
**Coding:** [Michael Stecky-Efantis](https://www.linkedin.com/in/michael-se) - contact for enterprise collaborations and sponsorships
**Art Design:** [Azubuike Nwadike](https://www.facebook.com/xbilldn) - contact to hire for excellent quality design and art work