dpd-emitter
Emit events for collection CRUD operations on Deployd
Installation
npm install dpd-emitter --save
Events
Events created, updated and deleted are emitted when models are created,
updated and deleted respectively.
Event Data
The model object operated on is always sent along with the events.
Usage
var socket = io('http://localhost:2403');
socket.on('<resourcename>:created', function(model) {
});
socket.on('<resourcename>:updated', function(model) {
});
socket.on('<resourcename>:updated:<id>', function(model) {
});
socket.on('<resourcename>:deleted', function(model) {
});
socket.on('<resourcename>:deleted:<id>', function(model) {
});