嗨,我正在致力于reactJS 希望了解如何通过我的IP地址在其他某台计算机上运行我的本地React应用程序,该应用程序在http://localhost:8888/index.html#/?_k=pu9k2u上运行?在其他计算机上运行反应代码
每当我做一个“故宫开始”,它始终运行在localhost:8888
如何改变它的运行0.0.0.0:8888?
我知道如何更改端口的应用程序,
以下是我webpack.congif.js
module.exports = {
entry: './index.js',
output: {
filename: 'index.js',
path: ''
},
devServer: {
inline:true,
port: 8888
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
]
}
}
因为我是很新的reactJS善意解释解决方案如下或提供更新webpack.config.js
How to make the webpack dev server run on port 80 and on 0.0.0.0 to make it publicly accessible?
我给我的这个端口8888我自己在webpack.config.js我的反应应用程序 –
您可以使用它,至少 –
有没有其他解决方案?我无法通过防火墙打开端口 –