0

Is it possible to use lwc with Express.js (with multiple routing, e.g. /user, /account etc.)?

I am currently working on a api integration with UI. The api integration I will handle with Express and UI I am planning to use LWC. I could not find a solution which uses of both them.

Sure there is a repo https://lwc-recipes-oss.herokuapp.com/ as an example, normally I can improve this but I could not find a routing config for this app (with multiple routing, e.g. /user, /account etc.).

0

I have got the answer, actually it was easy because the Salesforce team already provided the solution.

Under the link https://lwc.dev/guide/install, when you install lwc with npx, it asks "Use custom Express server configuration" and you can say it yes and the Express.js server configuration is already under index.js.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.