eymon
v1.0.0
Published
es6 classes promisifying communication with mongodb
Downloads
13
Readme
eymon
es6 classes promisifying communication with mongodb
usage
details
StorageService currently supports:
- create
- read
- update, updateInto, updateMany, updateManyInto
- delete, deleteMany
examples
create my favorite color document
import eymon from 'eymon';
const service = new eymon.StorageService("playa");
service.create('color', {
type: 'favorite',
value: 'blue'
});
read my favorite color document
import eymon from 'eymon';
const service = new eymon.StorageService("playa");
service.read('color', {type: 'favorite'})
.then( (resultSet) => {
console.log(resultSet);
})
.catch( (error) => {
console.log('error: ', error);
});