Trying to run strapi on localhost using yarn start.
However when trying to reach the admin panel I see SSL protocol error. I’ve tried clearing SSL state checking clock settings and all the usual stuff. I can’t even launch yarn develop… still happens?!
I’m having the same issue where I’ve separated the front and back ends as suggested in the documentation, but get a ERR_SSL_PROTOCOL_ERROR when trying to connect the two in a local environment. I realize normally they are separated for deployment, but I’m attempting to separate the two to embed the front end into another React application. Here is my config/server.js file:
In the URL bar, I have verified the server is running at localhost:1337 without the admin panel accessible. The front end, I am opening the index.html file from the build, but get the error. Any ideas?
Here’s the basic steps I took in case anyone is looking for the solution in the future:
Basic outline for separating Strapi front and back ends (LOCAL ENV ONLY), then running each separately, yet connected:
Install a local version of Strapi
Modify the Strapi config/server.js file to the example at the bottom of this comment
Create a front end build running “npm run build” in your Strapi directory.
Start the back end server with the same server.js settings you altered. Navigate to http://localhost:1337. A display should appear in the browser telling you the server is running, however the link to the admin panel UI no longer exists.
Copy the build folder and its contents (The front-end)
Paste the build folder into a different directory of your choice
Globally install the npm package named “serve”
Navigate to the directory of your new front-end location in the CLI (but not to the build folder)
Run “serve -s build” → It should take the build folder generated and serve the contents of the admin panel connecting it to the back end!!