Basic node.js app to post to a Salesforce generic streaming channel using Express, nForce, and Jade templating library.
This works with the Generic Streaming API demo component you can install in your Salesforce org.
For more information on the Streaming API, generic streaming events, and the new durable streaming features I recommend reading the doc on Salesforce Streaming API and watching the Dreamforce 15 video given by the product team leads Product Manager Jay Hurst and lead developer John Brock.
Horribly hacked into place from Jeff Douglas' nForce demo app.
Deploy this app to Heroku for free and have it up and running in a matter of minutes.
From the command line type in:
git clone git@github.com:pchittum/durable-stream-post-message
cd durable-stream-post-message
npm install
These will be automatically installed when you use any of the above npm installation methods above.
- express - framework
- nforce - REST wrapper for force.com
- async - asynchronous utility module
- jade - the view engine
- Open terminal and change directory to node-nforce-demo root
node app.js
- Point your browser to: http://localhost:3001
heroku create
heroku config:add CLIENT_ID=YOUR-SALESFORCE-CLIENT-ID
heroku config:add CLIENT_SECRET=YOUR-SALESFORCE-SECRET
heroku config:add USERNAME=YOUR-SALESFORCE-USERNAME
heroku config:add PASSWORD=YOUR-SALESFORCE-PASSWORD-AND-TOKEN
heroku open
This application is running on heroku at: http://durable-stream.herokuapp.com/
- Peter Chittum -> pchittum
- Jeff Douglas (original project) -> jeffdonthemic