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 ::1

Step 3: Change your localhost address and add an ‘s’ to the sitecoreApiHost url

sitecoreApiHost settings

Step 4: Start your app with this command

// for MacOS
HTTPS=true npm start
// for Windows
set HTTPS=true&&npm start
Sitecore JSS running on https
Sitecore JSS app running locally and is secured

Happy Hacking!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s