簡體   English   中英

我如何在https中啟動nwb?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM