LoopBack 3 has entered Maintenance long-term support (LTS), only critical bugs
and critical security fixes will be provided. We urge all LoopBack 3 users
to migrate their applications to LoopBack 4 as soon as possible. Learn more in
our blog post.
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.