Heroku demonstration app forked from Bear Watch.
complete the Trailhead project: Build an Instant Notification App
We make use of the same settings.
$ node --version
v8.9.1
package.json --> engines --> node
"engines": {
"node": "8.9.x"
}
Login to Salesforce --> Setup --> Apps --> App Manager --> New Connected App
- Connected App Name: Salesforce Node Client
- API Name: Salesforce_Node_Client
- Contact Email: your email address
- Enable OAuth Settings: Yes
- Callback URL: https://your-heroku-app.herokuapp.com/auth/callback
- Selected OAuth Scopes: Access and manage your data (api)
Click the save button and wait for a while. We can make use of the Consumer Key and Consumer Secret.
server/config.js --> config.sfdc --> domain, callbackUrl, consumerKey, consumerSecret, apiVersion
config.sfdc = {
auth : {
domain : 'https://login.salesforce.com', // develper edition
callbackUrl : 'https://your-heroku-app.herokuapp.com/auth/callback',
consumerKey : 'xxxxxxxxxxxxxxxxxxxx',
consumerSecret : 'xxxxxxxxxx',
},
data : {
apiVersion : 'v42.0'
}
};
Field Label | API Name | Data Type |
---|---|---|
Email__c | Text(255) | |
Notifier | Notifier__c | Text(255) |
server/config.js --> config.server --> sessionSecretKey
config.server = {
sessionSecretKey : 'xxxxxxxxxx'
};
$ heroku create --app your-heroku-app
$ git add .
$ git commit -m "initial commit"
$ git push heroku master
$ heroku open --app your-heroku-app
Heroku demonstration app for the "Build an Instant Notification App" Trailhead project (an introduction to platform events).
This application uses the following dependencies (non-exhaustive):
- Salesforce Node client a Node library for Force.com OAuth 2.0 authentication and data interactions.
- Salesforce Lightning Design System (SLDS).
- Background image source: https://w-dog.net
- Bear footprint image source: http://icons8.com