create-react-app:如何使用https而非http? [英] create-react-app: how to use https instead of http?
本文介绍了create-react-app:如何使用https而非http?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有人知道如何在dev-create-react-app环境中使用https。我在自述文件或快速谷歌搜索中看不到任何有关此内容的信息。我只希望 https:// localhost:3000 工作,否则 https:// localhost:3001 。
I was wondering if anyone knows how to use https on dev for the 'create-react-app' environment. I can't see anything about that in the README or quick googling. I just want either the https://localhost:3000 to work, or else https://localhost:3001.
推荐答案
设置 HTTPS = true
,然后再运行启动命令。
Set HTTPS=true
before you run the start command.
该实现使用 HTTPS环境变量来确定启动服务器时要使用的协议。
这篇关于create-react-app:如何使用https而非http?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文