Node.js for Salesforce Developers

Node.js is an open-source JavaScript runtime powered by V8, the same runtime used in Google Chrome, Brave, and Microsoft Edge (Chromium version) web browsers. It’s trusted by companies like NASA, PayPal, Walmart, LinkedIn, Netflix, and of course salesforce. Node js is used in several places, however it is just a JavaScript runtime environment. Lets learn about Node.js for Salesforce Developers.

Why do salesforce developers need Nodejs?

Node.js (and JavaScript) has the largest package repository out there: npm. Today, npm hosts more than 1.4M packages and libraries that can be used in any Node.js project. You must have heard about LWC. Even though LWC isn’t specifically Node.js, it uses npm as the package repository for distribution, and many different developer tools like Webpack and Rollup to build and compile LWC projects.

The Salesforce CLI and the Heroku CLI are created using oclif, an Open Source framework for creating CLI applications using Node.js. So even if you aren’t writing applications with Node.js, you’re using it every time you create a Salesforce project using sfdx. If you want to extend the CLI using plugins, you can write them using Node.js with either JavaScript or TypeScript as its primary language.

Node js applications can be deployed on Heroku as well

At Dreamforce salesforce functions were announced, a powerful serverless runtime to deliver connected experiences with elastic scale.First planned supported runtime for Salesforce Functions is Node.js – making it a must-learn technology to create pro-code applications on the Salesforce Platform.

 Demo1: Simple node js application

Using Node js we will host a server, and host webservices. And using browser/tools we will call those apis. We will use express.js framework for this. Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications. It facilitates the rapid development of Node based Web applications.

Demo 2:  Complex application using Nodejs

Ecars application shows how the fictitious Pulsar Motors uses the Salesforce Platform. It includes technologies like Sales Cloud, Service Cloud, source-driven development, event-driven architecture, Lightning Web Components, Heroku, Node.js services, a Progressive Web App, streaming data, Internet of Things, Postgres, and Apache Kafka.

Node.js for Salesforce Developers Video

YouTube video

Amit Chaudhary
Amit Chaudhary

Amit Chaudhary is Salesforce Application & System Architect and working on Salesforce Platform since 2010. He is Salesforce MVP since 2017 and have 17 Salesforce Certificates.

He is a active blogger and founder of Apex Hours.

Articles: 461

Leave a Reply

Your email address will not be published. Required fields are marked *