As a summary I am having issues using a proxy domain which is has a local SSL certificate and getting the yarn dev
command to work as expected.
For context I am using the LocalWP to connect with my WPEngine sites, and use that as my virtual environments. I am using Sage 6.6.6
and corresponding packages.
For a while now, because I have moved over to using LocalWP application my Yarn Dev command doesn’t work, and I have been using the Yarn Build command, but time has come to try and work out what is going on. When using LocalWP it almost forces you to create a SSL certificate for your domain name (e.g https://domain.local/).
I have followed a couple of approaches that I have found on this forum, some that are using BrowserSync instead, I have tried this, however to no avail. So I am still attempting this using Bud JS and the app.serve
method. Here is my config below:
.proxy('https://domain.local/')
.serve({
url: new URL(`https://localhost:4000/`),
cert: `/Users/USER/domain.local+1.pem`,
key: `/Users/USER/domain.local+1-key.pem`,
})
I have created localhost SSL using mkcert
which allows domain.local
to be secure and I can see this being reflect in chrome URL bar with the little padlock next to it.
However, when viewing the page I am getting this error ‘Error occurred while trying to proxy: localhost:4000/’
Has anyone run into this issue before?