import express from 'express';
import path from 'path';
import webpack from 'webpack';
import config from './webpack.dev.config';

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

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

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

app.listen(process.env.port || 3000, function (err) {
  if (err) {
    console.log(err)
    return;
  }

  console.log('Visit devServer: http://localhost:3000');
});

@@ -181,17 +181,51 @@
 onfig);%0A
+app.use(express.static('public'));
 %0A
-
 app.use(
@@ -345,20 +345,12 @@
 et('
+/
 *',
- function
  (re
@@ -356,16 +356,19 @@
 eq, res)
+ =%3E
  %7B%0A  res
@@ -459,23 +459,17 @@
 000,
- function
  (err)
+ =%3E
  %7B%0A 

add express static to route public/