docs/site/Redis-connector.md
{% include content/strongloop-labs.html lang=page.lang %}
{% include toc.html %}
{% include note.html content="The Redis connector requires Redis 3.0.3+. " %}
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.
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:
{% include code-caption.html content="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.