@casbin/etcd-watcher
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i @casbin/etcd-watcher

Homepage

casbin.org

Weekly Downloads

1

Version

1.0.0

License

none

Unpacked Size

17 kB

Total Files

10

Last publish

Collaborators

  • chalin
  • hsluoyz