LoopBack 3 has reached end of life. We are no longer accepting pull requests or providing
support for community users. The only exception is fixes for critical bugs and security
vulnerabilities provided as part of support for IBM API Connect customers.
We urge all LoopBack 3 users to migrate their applications to LoopBack 4 as soon as possible.
Learn more about
LoopBack's long term support policy.
In your application root directory, enter this command to install the connector:
$ 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:
Edit datasources.json to add other properties that enable you to connect the data source to a Redis database.
Connector name, either "loopback-connector-redis" or "redis"
Database host name. For connector versions <= v0.1.0, when this property is set,
the port property **must also** be set.