使用react-host-web开发网站,发现只能在客户端用127.0.0.1+端口访问, 请问怎么样用本地的ip+端口访问我创建的网站。
React-hot-web
flying_hbt
#2
webpack.config.js devServer添加host:‘0.0.0.0’
devServer: { host: '0.0.0.0', },
然后就可以用你的ip+port的形式访问了,同局域网内的其他用户也可以访问