Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. axon = require('axon');
  2. // start axon's socket
  3. socket = axon.socket('sub-emitter')
  4. socket.connect(9105) // 9105 is the data-system axon port
  5. socket.on('file.*', function(event, id){
  6. // event is one of 'create', 'update', 'delete'
  7. // id == id of the updated file
  8. File.find(id, function(err, updatedFile){
  9. // do anything with the file
  10. });
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement