document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. sourceData = @sourceData
  2.  
  3. g = (variable)->
  4.     item = sourceData.findOne(name:variable)
  5.     if item
  6.         not item.value
  7.        
  8. Meteor.methods
  9.     Control: (variable) ->
  10.         value = if g variable then 1 else 0
  11.         HTTP.call \'GET\', \'http://localhost:5000/set_balbula_1/\'+value
  12.        
  13. f = ->
  14.     data = HTTP.call \'GET\', \'http://localhost:5000/data\'
  15.     data = data.data
  16.     for key, value of data
  17.         sourceData.update({name: key}, {$set: {value: value } })
  18.  
  19. Meteor.setInterval f, 1000
');