nodejs 修改 host port - xd21303/Notebook GitHub Wiki

修改webpack.dev.js文件。

  devServer: {
    stats: 'errors-only',
    inline: true,
    host: "0.0.0.0", // Defaults to `localhost` process.env.HOST
    port: 8186, // Defaults to 8080 process.env.PORT
    open: true, // Open the page in browser
    contentBase: path.resolve(__dirname, '/lib')
  }

默认的localhost,是无法在docker中映射出来的,必须修改为,0.0.0.0