This is a simple interactive demonstration of how to use Salesforce with Node.js via a library called jsforce. jsforce can be run via command line or used with server side solutions like express.
Node is required, obviously: https://nodejs.org/en/
You will also want a Developer Edition org (which are free and do not have a fixed expiration): https://developer.salesforce.com/signup
Then to install and run:
index.js will accept:
In config.json, you can also set "deployToWeb" to be true to see a sample API call via express at /contacts.
If you are using a scratch org or sandbox, add "production" to config.json and set it to false.
All variables can be handled as environment variables as well, which will override config.json.
Comments within index.js point to specifics about the code. Full documentation for jsforce can be found on the project site: https://jsforce.github.io/
To learn more about developing on the Salesforce Platform, see the Beginner Developer trail on Trailhead: https://trailhead.salesforce.com/content/learn/trails/force_com_dev_beginner
Make sure you are logged in to the Heroku Dashboard
Click the button below to deploy on Heroku: