1.0.19 • Published 5 years ago

crud-controler-bg v1.0.19

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Need to have following things in the client repo for using this package

const mongoUrl = "";

collectionsList = [];

var db = mongo(mongoUrl, collectionsList);

var bodyParser = require('body-parser');

//import package

var commonController = require('crud-controler-bg');

// get an instance of express router

const app = express();

app.use(bodyParser.json()); // handle json data

app.use(bodyParser.urlencoded({ extended: true })); // handle URL-encoded data

commonController.setDbConnection(db); // set the connection obj to package

//// common routes

app.route('/').post(commonController.getAllItems);

app.route('/add').post(commonController.addAnItem);

app.route('/delete').post(commonController.removeAnItem);

app.route('/update').post(commonController.updateAnItem);

It holds reqHeader as json

options:

{

caseSensitive: false;

data: {

};

model: "";

redux: "";

searchFields: [

];

searchText: "";

item: { };

uid: null;

match: { };

sort: null;OR {createdBy: -1}

limit: null;OR Numeric 

skip: null;OR Numeric 

project: null;OR {}

}

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago