求问:egg.js启动的服务如何设置为https
发布于 6 年前 作者 justbecoder 3413 次浏览 来自 问答

egg.js如何设置启动为https的服务?

8 回复

默认启动的是 http://127.0.0.1:7001,如何变成是https://127.0.0.1:7001

推荐用nginx,也可以通过启动参数,使用https

@shenqidebaozi 启动参数如何设置,直接 --https 吗

egg-scripts start --daemon --port=443 --https=true

"scripts": {
  "dev": "egg-bin dev --https.key=\"c:/02.key.unsecure\" --https.cert=\"c:/02.crt\""
 }

@justbecoder 多看看文档吧

来自酷炫的 CNodeMD

回到顶部