UNPKG

pvserverhelper

Version:

This is an npm module design to perform common uses with pVelocity's pvserver

16 lines (14 loc) 453 B
### ``createCollection(jsapi, collectionName, [drop], [indices])`` Creates collection ``collectionName``. If ``drop`` is `true`, and the collection already exists, it would be dropped and recreated. - `jsapi` `<Object>` - `collectionName` `<String>` - `drop` `<String>`: Optional, default is `false` - `indices` `<Array>` ```js pvh.createCollection(jsapi, 'Opportunities', true, [{ keys: { name: 1 } }]).then(function(result) { }); ```