I was trying to use local development in lwc (lightning web components) but I found that I can't access the org data because of cors. I try to add my local URL (http: that lwc services generate for me when I run (npm start watch). But my org does not accept http url, only https, so the question is, how can I start my local server on https so I can add my URL to my Whitelisted Origins on my org? Thank you!

  • How to setup this local development? Is there any documentation related to his? @sebas
    – ajinkyah
    Commented Jul 26, 2019 at 7:13
  • @ajinkyah Hi! Here it is all the doc: lwc.dev Commented Jul 29, 2019 at 12:21
  • This website is for LWC Open Source, right? Is this the same as Local Development for LWC which was presented in TrailheadDX?
    – ajinkyah
    Commented Aug 8, 2019 at 8:52
  • @ajinkyah that's right! Commented Aug 9, 2019 at 12:37
  • 1
    Right Joe. I have seen this. Local development will be supported with a sfdx command and is intended for local development of the components for Salesforce org which is not the case with LWC open source. People are mixing these two and considering the two to be same.
    – ajinkyah
    Commented Aug 28, 2019 at 6:14

2 Answers 2


You can whitelist http://localhost:3001 - localhost is an allowed exception

  • For anyone that try this solution, when you start the server with 'npm run watch' the url it is but you can also use localhost, it works. Thanks @Renji-xD Commented Jun 18, 2019 at 13:52

When you want to launch watch mode with HTTPS you can pass a custom webpack.config.js using the -w flag that will enable the https option in webpack.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .