var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');

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

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

@@ -1,12 +1,690 @@
+const querystring = require('querystring');%0Aconst express = require('express');%0Aconst http = require('http');%0Aconst httpProxy = require('http-proxy');%0A  %0Avar port = process.env.PORT %7C%7C 3000;%0Avar isProduction = process.env.NODE_ENV === 'production';%0Aconsole.log('env is prod =', isProduction);%0A%0Aif (isProduction) %7B // prod :%0A  // Init express server%0A  var app = this.app = new express();%0A%0A  app.use(express.static(__dirname + '/')); %0A%0A  //for react router, we redirect on index.html%0A  app.get('*', function (request, response)%7B%0A    response.sendFile(__dirname+'/index.html');%0A  %7D)%0A%0A  app.listen(port);%0A  console.log(%60Listening at http://localhost:$%7Bport%7D%60)%0A%0A%7D else %7B // dev :%0A%0A  
 var webpack 
@@ -701,24 +701,26 @@
 'webpack');%0A
+  
 var WebpackD
@@ -761,16 +761,18 @@
 rver');%0A
+  
 var conf
@@ -806,16 +806,18 @@
 fig');%0A%0A
+  
 new Webp
@@ -848,16 +848,18 @@
 fig), %7B%0A
+  
   public
@@ -890,16 +890,18 @@
 icPath,%0A
+  
   hot: t
@@ -905,16 +905,18 @@
 : true,%0A
+  
   histor
@@ -937,36 +937,70 @@
 true
-%0A%7D).listen(3000, 'localhost'
+,%0A    proxy: %5BproxyOptions%5D,%0A    setup: setup%0A  %7D).listen(port
 , fu
@@ -1022,16 +1022,18 @@
 sult) %7B%0A
+  
   if (er
@@ -1033,24 +1033,26 @@
  if (err) %7B%0A
+  
     return c
@@ -1072,13 +1072,17 @@
 r);%0A
+  
   %7D%0A%0A
+  
   co
@@ -1126,17 +1126,31 @@
 ost:
-3000
+' + port + '
 /');%0A
+  
 %7D);%0A
+%0A%7D%0A%0A

update server.js