The Redis connector enables LoopBack applications to connect to Redis data sources.
Page Contents
Note: This page was generated from the
loopback-connector-redis/README.md.
This project provides early access to advanced or experimental functionality. It may lack usability, completeness, documentation, and robustness, and may be outdated.
However, StrongLoop supports this project. Community users, please report bugs on GitHub.
loopback-connector-redis
The official Redis connector for the LoopBack framework.
Usage
Install dependencies
Install the required dependencies via NPM:
npm install --save loopback-connector-redis
npm install --save loopback-datasource-juggler
This connector depends on
loopback-datasource-juggler
.
Configure a Redis datasource
In your code, declare Redis as a datasource:
var DataSource = require('loopback-datasource-juggler).DataSource;
var ds = new DataSource('redis');
...
Testing
- Start the Redis server (using the default port)
- Run
npm test
WARNING
Existing data in database 0 may be deleted