So far, it sounds great, but why should you as a Salesforce Developer care about Node.js? Well, here are some of the cool things you can build with it and why it matters within the Salesforce Ecosystem.
As a Salesforce Developer, you might be using the Salesforce CLI (
sfdx); if not, start learning how to use it to create Salesforce Applications. It will help you build applications faster and generally improve your development process. The Salesforce Extension pack for VS Code also uses the sfdx CLI behind the scenes.
Lightning Web Components
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. So if you plan to create and distribute your web components, learning Node.js will help you through the process.
LWC can also be used as a standalone technology. You can create LWC applications using create-lwc-app, a command-line application written using oclif for Node.js. These applications can be deployed to any hosting provider (with or without Node.js support), though the recommended platform for deployment is, of course, Heroku, part of the Salesforce Platform.
Web applications & services
Heroku is a great place to deploy web applications. One of the main supported Open Source runtimes is Node.js; you can deploy not only beautiful looking, pixel-perfect web applications written in any modern web technology (including LWC OSS) but also deploy highly scalable web services.
In the npm ecosystem, you can find multiple libraries and frameworks to write these types of applications. For example, our latest sample application eCars, is written using Node.js. Web frameworks like Express and Fastify are well known, battle-tested, and trusted by many Fortune 500 companies using Node.js for their backend needs. With them, you can write powerful REST APIs, backend-for-frontend layers, GraphQL APIs, and many more.
At Dreamforce 2019 Salesforce Developers announced Salesforce Functions, a powerful serverless runtime to deliver connected experiences with elastic scale, their first planned supported runtime for Salesforce Functions is… you guessed it, Node.js – making it a must-learn technology to create pro-code applications on the Salesforce Platform.
Read the full blog at the link below.