nestjs-casbin-mongodb
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

NestJs Casbin Mongodb

NestJS module for Casbin using the MongoDB Adapter

NPM Version License Code Size Top Language Top Language

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.

Readme

Keywords

none

Package Sidebar

Install

npm i nestjs-casbin-mongodb

Weekly Downloads

38

Version

1.2.5

License

MIT

Unpacked Size

1.72 MB

Total Files

115

Last publish

Collaborators

  • juicycleff