nestjs-casbin-mongodb
v1.2.5
Published
NestJS Casbin module with MongoDB Adapter
Downloads
225
Readme
Installation
$ yarn install nestjs-casbin-mongodb
Setup module
import { Module } from '@nestjs/common';
import { NestCasbinModule } from 'nestjs-casbin-mongodb';
import { join } from 'path';
@Module({
imports: [
NestCasbinModule.forRoot({
uri: 'mongo://localhost:27017',
casbinModelPath: join(__dirname, './rbac_model.conf'),
collectionName: 'roles',
databaseName: 'my-db-name',
}),
],
controllers: [],
providers: [],
})
export class AppModule {}
License
This project is MIT licensed.