[英]How i can start nwb in https?
我有這個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
但它不起作用:(
請幫忙
您可以在nwb.config.js
模塊中通過devServer.https
配置執行此操作……
{
devServer: {
https: true
}
}
…或通過CLI:
nwb serve-react-demo --devServer.https
nwb.config.js中的配置
module.exports = {
devServer: {
host: "sso-admin-presit.hktdc.com",
port: 443,
https: true
},
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.