start.js 734 Bytes
Newer Older
1
2
process.env.NODE_ENV = 'development';

Dan Abramov's avatar
Dan Abramov committed
3
4
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
5
var config = require('../webpack.config.dev');
Dan Abramov's avatar
Dan Abramov committed
6
7
8
9

new WebpackDevServer(webpack(config), {
  publicPath: config.output.publicPath,
  historyApiFallback: true,
Dan Abramov's avatar
Dan Abramov committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  stats: {
    hash: false,
    version: false,
    timings: false,
    assets: false,
    chunks: false,
    modules: false,
    reasons: false,
    children: false,
    source: false,
    publicPath: false,
    colors: true,
    errors: true,
    errorDetails: true,
    warnings: true,
  }
Dan Abramov's avatar
Dan Abramov committed
26
27
28
29
30
31
}).listen(3000, 'localhost', function (err, result) {
  if (err) {
    return console.log(err);
  }
  console.log('Listening at http://localhost:3000/');
});