Skip to content

Use HTTPS for local development ​

For connecting online uhuu-editor, uhuu-sdk requires you to serve local development site over HTTPS🔒.

Step: 1 ​

Install mkcert (only once).

bash
brew install mkcert
brew install nss # if you use Firefox

Step: 2 ​

In your terminal, run the following command:

bash
mkcert -install

Step: 3 ​

At the project root directory run the following command to generate a certificate for your site, signed by mkcert.

bash
mkdir -p .cert && mkcert -key-file ./.cert/key.pem -cert-file ./.cert/cert.pem 'localhost'

Step: 4 ​

set up .env file or modify vite.config.js to use newly created certificate.

Copy sample environment file to .env

bash
cp .env.sample .env

or modify vite.config.js

js
const keyPath = './.cert/key.pem';
const certPath = './.cert/cert.pem';