/**
 * Created by Jared on 16/2/23.
 */
var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('./webpack.config.dev');

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

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

app.use(require('webpack-hot-middleware')(compiler));
app.use(require('connect-history-api-fallback')())
app.get('*', function(req, res) {
    res.sendFile(path.join(__dirname, './client/index.html'));
});

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

    console.log('Listening at http://localhost:3000');
});
/**
 * Created by Jared on 16/2/23.
 */
var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('./webpack.config.dev');



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

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

app.use(require('webpack-hot-middleware')(compiler));
app.use(require('connect-history-api-fallback')())
app.get('*', function(req, res) {
    res.sendFile(path.join(__dirname, './client/index.html'));
});

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

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