:arrow_up: Bump lodash from 4.17.15 to 4.17.19 (#4) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Redis watcher for node-casbin
# NPM npm install --save redis-watcher # Yarn yarn add redis-watcher
import { RedisWatcher } from 'redis-watcher'; import { newEnforcer } from 'casbin'; // Initialize the watcher. const watcher = await RedisWatcher.newWatcher('redis://localhost:6379/5'); // Initialize the enforcer. const enforcer = await newEnforcer('examples/authz_model.conf', 'examples/authz_policy.csv'); enforcer.setWatcher(watcher); // By default, the watcher's callback is automatically set to the // enforcer's loadPolicy() in the setWatcher() call. // We can change it by explicitly setting a callback. watcher.setUpdateCallback(() => console.log('Casbin need update'));