/* eslint-disable */

var path = require("path");
var express = require("express");
var webpack = require("webpack");
var config = require("./webpack.config");

var app = express();
var compiler = webpack(config);

app.use(require("webpack-dev-middleware")(compiler, {
  noInfo: true,
  publicPath: config.output.publicPath
}));

app.use(require("webpack-hot-middleware")(compiler));

app.get("*", function(req, res) {
  res.sendFile(path.join(__dirname, "index.html"));
});

app.listen(3000, "localhost", function (err) {
  if (err) {
    console.log(err);
    return;
  }

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

@@ -204,24 +204,68 @@
 k(config);%0A%0A
+var serverPort = process.env.PORT %7C%7C 3000;%0A%0A
 app.use(requ
@@ -524,20 +524,26 @@
 .listen(
-3000
+serverPort
 , %22local
@@ -667,13 +667,22 @@
 ost:
-3000%22
+%22 + serverPort
 );%0A%7D

Allow configurable port