0.0.9 • Published 8 months ago

strapi-connector-redis v0.0.9

Weekly downloads
29
License
ISC
Repository
github
Last release
8 months ago

strapi-connector-redis

☝️ DEPRECATED This package won't be further maintained!

Redis connector for Strapi

Check out Strapi: https://github.com/strapi/strapi

The missing Redis connector for Strapi. By using this third-party (not official Strapi) connector, you can use Redis client on your Strapi instance, therefore you can access your Redis database in your controllers and services. (or wherever Strapi instance is available)

Please note, this plugin is in very early stage, it can happen that frequent updates will happen therefore you should try to update your npm package frequently!

How to install?

npm i strapi-connector-redis -S

How to use?

1. Add your Redis configuration to your config/database.js file:

Note: This connector uses node-redis so check out: https://github.com/NodeRedis/node-redis for configuration guide.

connections: {
  redis: {
    connector: "redis",
      settings: {
      db: "0",
      host: "127.0.0.1",
      port: 6379
    },
    debug: true
  },
  // ... more database configurations
}

2. Access your Redis client on the Strapi instance (on controllers or services)

Note: Redis commands are promisified so no callback is required, it will return a promise

const fooValue = await strapi.redis.get('foo')

Changelog

  • 0.0.7. Update README to be aligned with latest Strapi configuration

Found any issues?

https://github.com/zoltanradics/strapi-connector-redis/issues

Contact me if you

  • need help
  • want to contribute
  • just want to chat about Strapi, React or Javascript or any exciting tech

Hit me up on: zoltan.radics@gmail.com

0.0.9

8 months ago

0.0.8

2 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago