Redis-watcher
Redis watcher for node-casbin based on ioredis.
Installation
# NPM npm install --save @casbin/redis-watcher # Yarn yarn add @casbin/redis-watcher
Note: redis-watcher has been deprecated on NPM.
Example
Using Redis:
;; // Initialize the watcher, see https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options; // Initialize the enforcer.; enforcer.setWatcherwatcher;
Using Redis cluster:
;; // Initialize the watcher, see https://github.com/luin/ioredis/blob/master/API.md#new-clusterstartupnodes-options.; // Initialize the enforcer.; enforcer.setWatcherwatcher;