Skip to content

apache/casbin-node-casbin-etcd-watcher

Repository files navigation

etcd-watcher

ETCD watcher for node-casbin

Installation

# NPM
npm install --save @casbin/etcd-watcher

# Yarn
yarn add @casbin/etcd-watcher

Simple Example

import EtcdWatcher from '@casbin/etcd-watcher';
import { newEnforcer } from 'casbin';

// Initialize the watcher.
const watcher = await EtcdWatcher.newWatcher('http://127.0.0.1:2379');

// Initialize the enforcer.
const enforcer = await newEnforcer('examples/authz_model.conf', 'examples/authz_policy.csv');

enforcer.setWatcher(watcher);

About

Etcd watcher for Node-Casbin

Topics

Resources

License

Code of conduct

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors