forked from jchapron/redux-friendlist-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
23 lines (18 loc) · 778 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var webpack = require('webpack');
// The webpack-dev-server is a little node.js Express server,
// which uses the webpack-dev-middleware to serve a webpack bundle.
// It also has a little runtime which is connected to the server via Socket.IO.
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
// the the webpack-dev-server configuration to enable HMR on the server.
hot: true,
// Set this as true if you want to access dev server from arbitrary url.
historyApiFallback: true
}).listen(3000, 'localhost', function (err, result) {
if (err) {
console.log(err);
}
console.log('Listening at localhost:3000');
});