Monday, August 15, 2022
No menu items!
HomeSalesForceDeploy LWC OSS apps to Heroku with Express API Server | Developer...

Deploy LWC OSS apps to Heroku with Express API Server | Developer Quick Takes

Learn how to deploy LWC OSS apps that use an Express API Server to Heroku. When running such apps, two Express servers get initialized – One that serves static content, and the other that serves APIs, and each server runs on a different port. But Heroku dynamically assigns the port number to only one of the servers, and the other fails. Check out this Quick Take to see why it happens and how to fix it.

GitHub repo with the modified api.js and package.json:

To know how to deploy an LWC OSS app without Express API Server to Heroku, check out Deploy LWC OSS apps to Heroku without Express API Server | Developer Quick Takes:

Learn more about Heroku:
Deployment Options for Heroku:
Learn more about Lightning Web Components Open Source: (

00:00 Start
01:28 Explaining api.js and server.js
03:25 Tweaking the code to support Heroku deployment
06:43 Deploying the app to Heroku

Track: BeatFort – Rampant Sunrise
Music provided by Ninety9Lives
Stream / Free Download:



- Advertisment -spot_img

Most Popular