create-react-app:使用单个命令在Win和Mac / UNIX上运行HTTPS

时间:2019-05-07 12:58:25

标签: https create-react-app package.json

要在HTTPS上运行create-react-app,您可以像这样调整package.json

{
  ...
  "scripts": {
    "start": "react-scripts start",               // HTTP (by default)
    "startwin": "set HTTPS=true&&npm start",      // HTTPS on Windows
    "startunix": "HTTPS=true react-scripts start" // HTTPS on Mac/UNIX
  },
  ...
}

是否有办法通过一个命令在两个操作系统上的HTTPS上运行create-react-app

0 个答案:

没有答案