Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/node-casbin/etcd-watcher
Etcd watcher for Node-Casbin
https://github.com/node-casbin/etcd-watcher
authorization authz casbin etcd nodejs watcher
Last synced: 2 months ago
JSON representation
Etcd watcher for Node-Casbin
- Host: GitHub
- URL: https://github.com/node-casbin/etcd-watcher
- Owner: node-casbin
- License: apache-2.0
- Created: 2019-12-24T08:46:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T21:22:38.000Z (almost 3 years ago)
- Last Synced: 2024-10-25T03:04:30.476Z (3 months ago)
- Topics: authorization, authz, casbin, etcd, nodejs, watcher
- Language: TypeScript
- Homepage: https://github.com/casbin/node-casbin
- Size: 1.84 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# etcd-watcher
ETCD watcher for node-casbin
# Installation
```shell script
# NPM
npm install --save @casbin/etcd-watcher# Yarn
yarn add @casbin/etcd-watcher
```# Simple Example
```typescript
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);
```