This is a StrongLoop Labs project

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: Paying customers can open issues using the StrongLoop customer support system (Zendesk). Community users, please report bugs on GitHub. For more information, see StrongLoop Labs.

Installation

shell
$ npm install loopback-connector-redis --save

This will install the module and add it as a dependency to the application's package.json file.

Creating a Redis data source

Use the data source generator to add a Redis data source to your application.  When prompted for the connector, choose other, then enter redis for the connector name.  The entry in the application's server/datasources.json will look like this:

/server/datasources.json
"redisDS": {
    "name": "redisDS",
    "connector": "redis",
}

Edit datasources.json to add other properties that enable you to connect the data source to a Redis database.

Properties

PropertyTypeDescription
connectorString

Connector name, either "loopback-connector-redis" or "redis"

databaseStringDatabase name
hostStringDatabase host name
passwordStringPassword to connect to database
portNumberDatabase TCP port
urlStringUse instead host and port properties.
usernameStringUsername to connect to database