JSPM

  • Created
  • Published
  • Downloads 70
  • Score
    100M100P100Q79345F
  • License MIT

Manage documents in Mongo defining features

Package Exports

  • monguments

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (monguments) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

monguments

Manage your mongo documents with features. High traceability.

Table of Contents

Installation

npm install monguments

Usage

let monguments = require('monguments');
var myMonguments;

monguments(conf, collections,
    connector => {
        myMonguments = connector;
    });

myMonguments.process(request, "","nameCollection", callback);

Easy operations

process

permissions

callback

var response = {
    data:"",
    error: "",
    msg: ""
}

read & readList

write

add

set

close

Raw operations

read

write

add

set

close

Configuration

let conf = {
    server: 'localhost',
    database: 'test',
    user: 'user',
    password: 'pwd',
    replicaSet: 'replicaSet',
}

Features

let collections = {
    myCollection: {
        owner: "_id",
        versionable: false,
        versionTime: 0,
        closable: false,
        closeTime: 0,
        exclusive: false,
        id: '_id',
        idAuto: true,
        add: [],
        set: [],
        required: []
    }
}

Owner

Versionable

Closable

Exclusive

Id

Add

Set

Required