Skip to content

Crud with mongoDb-native and RBAC role/permission for AWS Lambdas

License

Notifications You must be signed in to change notification settings

emanueleliardo/lambda-mongo-crud

 
 

Repository files navigation

lambda mongo crud

Build Status

Crud with mongoDb-native and RBAC role/permission for AWS Lambdas

Installation

npm install @palmabit/lambda-mongo-crud --save

Usage

const Crud = require('@palmabit/lambda-mongo-crud')

const roles = {
    base: {
        can: ['posts:list','posts:get']
    },
    admin: {
        can: ['posts:save','posts:delete']
    }
}

const crud = new Crud('stringConnection','tableName','admin',roles)

const query = {}
const roleOptions = {}

crud.list(query,'posts:list',roleOptions, (err,docs) => {} )

Tests

npm test

Coverage

npm run-script test-travis

Author

Palmabit

License

MIT license

About

Crud with mongoDb-native and RBAC role/permission for AWS Lambdas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%