How to make the webpack dev server run on port 80 and on 0.0.0.0 to make it publicly accessible?

后端 未结 13 1291
时光取名叫无心
时光取名叫无心 2020-11-30 17:36

I am new to the whole nodejs/reactjs world so apologies if my question sounds silly. So I am playing around with reactabular.js.

Wh

13条回答
  •  暖寄归人
    2020-11-30 17:52

    If you're in a React Application created with 'create-react-app' go to your package.json and change

    "start": "react-scripts start",

    to ... (unix)

    "start": "PORT=80 react-scripts start",

    or to ... (win)

    "start": "set PORT=3005 && react-scripts start"

提交回复
热议问题