Skip to content

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

License

Notifications You must be signed in to change notification settings

zoltanradics/strapi-connector-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published