-
Notifications
You must be signed in to change notification settings - Fork 114
Deploy to Heroku
wwitman edited this page Dec 22, 2015
·
2 revisions
-
Click the Deploy to Heroku button on the bottom of the Zetta Cloud Starter GitHub repository.
-
Heroku will prompt you to setup a new Heroku account or log in with your existing account.
-
Pick an app name, like
myherokuname-zetta
.
You will now have a Zetta server instance running in the cloud.
Linking Zetta servers together requires one line of code.
-
In the server.js file that runs on your geo-distributed hub add the
link()
function to the zetta config:.link('http://myherokuname-zetta.herokuapp.com/')
-
Below is an example
server.js
file that inludes linking to a Zetta server running on Heroku.var zetta = require('zetta'); var LED = require('zetta-led-mock-driver'); var Photocell = require('zetta-photocell-mock-driver'); var duskToDawnLight = require('./apps/dusk_to_dawn_light'); zetta() .use(LED) .use(Photocell) .use(duskToDawnLight) .link('http://myherokuname-zetta.herokuapp.com/') .listen(1337, function(){ console.log('Zetta is running at http://127.0.0.1:1337'); });
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