es6 classes promisifying communication with mongodb
StorageService currently supports:
- create
- read
- update, updateInto, updateMany, updateManyInto
- delete, deleteMany
import eymon from 'eymon';
const service = new eymon.StorageService("playa");
service.create('color', {
type: 'favorite',
value: 'blue'
});
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);
});