Skip to content

jthurst01/platform-events-node-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

platform-event-node-example

Node demo that streams Platform Events from Salesforce.com to the browser using socket.io. You can run the demo by opening:

platform-event-node-example demo - New Platform Events are streamed to this app and display in the browser using socket.io.

Setup Remote Access in Salesforce.com

Setup a new Remote Access to get your OAuth tokens. If you are unfamiliar with settng this up, see 4:45 of Jeff Douglas' Salesforce.com Primer for New Developers. For your callback, simply use: http://localhost:3001/oauth/_callback

Create a Platform Event Definition in Salesforce.com

Create a new Platform Event from the Setup Menu of your Salesforce Instance.

Running the Application Locally

git clone https://github.com/jthurst/platform-event-node-example.git
cd platform-event-node-example
npm install

This will clone this repo locally so you simply have to make your config changes and be up and running. Now replace your OAuth tokens and credentials in the config.js file then run the following to start the server:

node app.js

Open your browser to http://localhost:3001 and creat a Platform Event Salesforce and see it appear on the page.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published