Hello here is another Sitecore JSS blog. In this blog, I will show you an easy way to secure your localhost with a certificate when developing Sitecore JSS applications in Disconnected Mode
I needed to run Sitecore JSS application on the localhost with https://
These few quick steps will get you going fast:
Step 1: Install mkcert
For MacOS
brew install mkcert
For Windows
choco install mkcert
Step 2: Generate Local Certs
$ mkcert -install
$ mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1
Step 3: Change your localhost address and add an ‘s’ to the sitecoreApiHost url

Step 4: Start your app with this command
// for MacOS
HTTPS=true npm start
// for Windows
set HTTPS=true&&npm start


Happy Hacking!!!