-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathserver.js
More file actions
23 lines (19 loc) · 508 Bytes
/
server.js
File metadata and controls
23 lines (19 loc) · 508 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
process.env.NODE_ENV = 'development';
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
var port = process.env.PORT || 3000;
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
stats: {
chunkModules: false,
colors: true,
}
}).listen(port, '0.0.0.0', function (err) {
if (err) {
console.log(err);
}
console.log('Listening at 0.0.0.0:' + port);
});