-
Notifications
You must be signed in to change notification settings - Fork 114
Apps
Kevin Swiber edited this page May 20, 2015
·
2 revisions
Zetta apps are exported module functions, and differ from Drivers and Scouts.
module.exports = function(server) {
var arduinoQuery = server.where({type: 'arduino'});
server.observe([arduinoQuery], function(arduino){
//Work with arduino!
});
}
-
server
Server
-
query
Object
Generate a query for use inside zetta. All options properties are &&'d together.
var query = server.where({foo: 'bar'});
-
queries
Array of Query -
cb
Function
Wait for devices to come online. Execute the callback when all devices conforming to queries have come online.
var queryFoo = server.where({type: 'foo'});
var queryBar = server.where({type: 'bar'});
server.observe([queryFoo, queryBar], function(foo, bar){
});
Need help? Visit the Zetta Discuss List !
Need help? Visit the Zetta Discuss List ! |
---|
About Zetta
Videos and webcasts
- NEW! Building with Zetta
Tutorials
- NEW! Zetta tutorial series
- Quick start
- Configure a simple device
- Build a mock LED device
- Use the browser client
- Deploy a Zetta server to Heroku
Understanding Zetta
Writing Zetta drivers
- Finding Zetta device drivers
- Create a device driver from starter code
- More coming soon...
Using streams
Reference