feat: fix model.conf and policy.csv mismatches (#21)

3 files changed
tree: fa91e49301dcdd837b573a00513dc9b0eae31770
  1. src/
  2. test/
  3. .eslintrc.json
  4. .gitignore
  5. LICENSE
  6. model.conf
  7. nest-cli.json
  8. nodemon-debug.json
  9. nodemon.json
  10. package-lock.json
  11. package.json
  12. policy.csv
  13. README.md
  14. tsconfig.build.json
  15. tsconfig.json
README.md

nest-authz-example

Commitizen friendly

Description

A demo shows how to use nest-authz to implement role-based access control.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Open http://localhost:3000/api to see api. The api uses Bear auth schema, so if you want to access protected api, you should click the Authorize button and set Bearer yourjwttoken after login.

Test

# unit tests
$ npm run test

License

MIT licensed.