var webpack = require('webpack')
var WebpackDevServer = require('webpack-dev-server')
var config = (process.env.NODE_ENV == "production") ?  require('./webpack.production.config') : require('./webpack.config')

new WebpackDevServer(webpack(config), {
  publicPath: config.output.publicPath,
  hot: true,
  historyApiFallback: true
}).listen(3000, 'localhost', function (err, result) {
  if (err) {
    console.log(err);
  }

  console.log('Listening at localhost:3000');
});

@@ -202,16 +202,70 @@
 config')
+%0Avar port = process.env.PORT ? process.env.PORT : 3000
 %0A%0Anew We
@@ -388,20 +388,20 @@
 .listen(
-3000
+port
 , 'local
@@ -514,13 +514,16 @@
 ost:
-3000'
+' + port
 );%0A%7D

fix port