Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- axon = require('axon');
- // start axon's socket
- socket = axon.socket('sub-emitter')
- socket.connect(9105) // 9105 is the data-system axon port
- socket.on('file.*', function(event, id){
- // event is one of 'create', 'update', 'delete'
- // id == id of the updated file
- File.find(id, function(err, updatedFile){
- // do anything with the file
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement