Skip to content

Commit

Permalink
Merge pull request #3 from Chalin-Shi/master
Browse files Browse the repository at this point in the history
rename npm package for publish
  • Loading branch information
hsluoyz authored Aug 20, 2018
2 parents 6020068 + c97212d commit c8fad8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm install casbin-express-authz
```js
const { Enforcer } = require('casbin')
const express = require('express')
const authz = require('express-authz')
const authz = require('casbin-express-authz')

const app = express()

Expand All @@ -39,7 +39,7 @@ app.use((req, res, next) => {
// use authz middleware
app.use(authz(async() => {
// load the casbin model and policy from files, database is also supported.
const enforcer = await Enforcer.newEnforcer("authz_model.conf", "authz_policy.csv")
const enforcer = await Enforcer.newEnforcer('authz_model.conf', 'authz_policy.csv')
return enforcer
}))

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "express-authz",
"name": "casbin-express-authz",
"version": "1.0.0",
"description": "express-authz is an authorization middleware for Express",
"description": "casbin-express-authz is an authorization middleware for Express",
"main": "authz.js",
"scripts": {
"prepublish": "npm run lint && npm run test",
Expand All @@ -11,6 +11,7 @@
},
"keywords": [
"node-casbin",
"casbin",
"expressjs",
"express",
"authz",
Expand Down

0 comments on commit c8fad8a

Please sign in to comment.