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

后端 未结 13 1311
时光取名叫无心
时光取名叫无心 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:53

    I tried the solutions above, but had no luck. I noticed this line in my project's package.json:

     "bin": {
    "webpack-dev-server": "bin/webpack-dev-server.js"
    

    },

    I looked at bin/webpack-dev-server.js and found this line:

    .describe("port", "The port").default("port", 8080)
    

    I changed the port to 3000. A bit of a brute force approach, but it worked for me.

提交回复
热议问题