From 06ba480ef0c10e38bd6cb6b98e09c0949cd0a389 Mon Sep 17 00:00:00 2001 From: Zack921 <407473490@qq.com> Date: Fri, 2 Jul 2021 16:39:47 +0800 Subject: [PATCH] docs(https-demo): improve README --- examples/https/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/https/README.md b/examples/https/README.md index 6840bde9..ba5fc5cc 100644 --- a/examples/https/README.md +++ b/examples/https/README.md @@ -1,12 +1,20 @@ ## How to run demo -### 1. Install Npm +### 1. Generate a self-signed certificate (key.pem and cert.pem) +```bash +openssl genrsa -out key.pem +openssl req -new -key key.pem -out csr.pem +openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem +rm csr.pem +``` + +### 2. Install Npm ```bash yarn // npm i ``` -### 2. Start the server +### 3. Start the server ``` npm run serve ``` \ No newline at end of file