Created
July 23, 2015 22:14
-
-
Save cdaringe/b67f4ebdee9fce7aa30e to your computer and use it in GitHub Desktop.
test-coins-webpack-dev-server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var webpack = require('webpack'); | |
var WebpackDevServer = require('webpack-dev-server'); | |
var config = require('./webpack.config.js'); | |
var fs = require('fs'); | |
var port = process.env.WEBPACK_DEV_SERVER_PORT || 22222; | |
var host = '0.0.0.0'; | |
var srv = new WebpackDevServer(webpack(config), { | |
contentBase: '../', | |
publicPath: '/', | |
colors: true, | |
hot: true, | |
historyApiFallback: true, | |
https: true, | |
inline: true, | |
key: fs.readFileSync('..kind-of-secret-ish'), | |
cert: fs.readFileSync('..kind-of-secret-ish'), | |
ca: fs.readFileSync('..kind-of-secret-ishe') | |
}).listen(port, host, function (err, result) { // jshint ignore:line | |
if (err) { | |
console.log(err); | |
} | |
console.log('Listening at ' + host + ':' + port); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment