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

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: https://github.com/adityanaag3/lwc-oss-express-heroku

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: https://www.youtube.com/watch?v=UoO_-3kC7x4

Learn more about Heroku: https://trailhead.salesforce.com/en/content/learn/modules/heroku_enterprise_baiscs
Deployment Options for Heroku: https://devcenter.heroku.com/categories/deployment
Learn more about Lightning Web Components Open Source: https://lwc.dev (https://lwc.dev/)

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: 99l.tv/rampantsunriseYU

RELATED ARTICLES

4 COMMENTS

- Advertisment -spot_img

Most Popular