Skip to content

Instantly share code, notes, and snippets.

@AdamMagaluk
Last active August 29, 2015 14:24
Show Gist options
  • Save AdamMagaluk/4ce6ca0f0801f35862f1 to your computer and use it in GitHub Desktop.
Save AdamMagaluk/4ce6ca0f0801f35862f1 to your computer and use it in GitHub Desktop.
Example Zetta Properties
var zetta = require('zetta');
var LED = require('zetta-led-mock-driver');
zetta()
.properties({ location: 'Home' })
.use(LED)
.listen(1337);
zetta()
.use(function(server) {
var query = server.from('*').where({ type: 'led' });
server.observe(query, function(led) {
console.log('Found LED: ' + led.id);
})
})
.listen(1337)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment