1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-08 22:15:02 +00:00
mon-entreprise/source/server.js
2018-01-03 16:54:19 +01:00

30 lines
893 B
JavaScript

var webpack = require('webpack')
var WebpackDevServer = require('webpack-dev-server')
var config = require('./webpack.config')
const PORT = process.env.PORT || 3000
new WebpackDevServer(webpack(config), {
disableHostCheck: true,
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
// It suppress error shown in console, so it has to be set to false.
quiet: false,
// It suppress everything except error, so it has to be set to false as well
// to see success build.
noInfo: false,
stats: {
// Config for minimal console.log mess.
assets: false,
colors: true,
version: false,
hash: false,
timings: false,
chunks: false,
chunkModules: false
}
}).listen(PORT, '0.0.0.0', function(err) {
if (err) console.log(err) //eslint-disable-line no-console
console.log('Bonjour ! Je vous sers sur localhost:' + PORT) //eslint-disable-line no-console
})