我有这个package.json脚本:
"scripts": {
"build": "nwb build-react-component",
"clean": "nwb clean-module && nwb clean-demo",
"start": "nwb serve-react-demo --host 127.0.0.1 --port 3000",
"test": "nwb test-react",
"test:coverage": "nwb test-react --coverage",
"test:watch": "nwb test-react --server"
},
如果我使用npm,请在http://127.0.0.1:3000
指出我的服务器我如何运行https?
我尝试HTTPS=true npm start
但它不起作用:(
请帮忙
答案 0 :(得分:0)
您可以在nwb.config.js
模块中通过devServer.https
配置来完成此操作...
{
devServer: {
https: true
}
}
…或通过CLI:
nwb serve-react-demo --devServer.https
答案 1 :(得分:0)
config
module.exports = {
devServer: {
host: "sso-admin-presit.hktdc.com",
port: 443,
https: true
},
}