Install mkcert tool.
$ mkcert -install
Using the local CA at "/Users/xxxxx/Library/Application Support/mkcert" ✨
create localhost
certificate:
$ mkcert myapp.dev example.com
Using the local CA at "/Users/xxxxxx/Library/Application Support/mkcert" ✨
Created a new certificate valid for the following names 📜
- "example.com"
- "myapp.dev"
The certificate is at "./example.com+1.pem" and the key at "./example.com+1-key.pem" ✅