Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Specifying host when listening for WebpackDevServer (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobby Earl authored Aug 16, 2017
1 parent 40a2a94 commit da33cdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function serve(argv, skyPagesConfig, webpack, WebpackDevServer) {

const compiler = webpack(config);
const server = new WebpackDevServer(compiler, config.devServer);
server.listen(config.devServer.port, (err) => {
server.listen(config.devServer.port, 'localhost', (err) => {
if (err) {
logger.error(err);
}
Expand Down
4 changes: 2 additions & 2 deletions test/cli-serve.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('cli serve', () => {

function webpackDevServer() {
return {
listen: (port, cb) => {
listen: (port, host, cb) => {
cb(err);
expect(logger.error).toHaveBeenCalledWith(err);
mock.stop(f);
Expand All @@ -98,7 +98,7 @@ describe('cli serve', () => {

function webpackDevServer() {
return {
listen: (port, cb) => {
listen: (port, host, cb) => {
cb();
expect(logger.error).not.toHaveBeenCalled();
mock.stop(f);
Expand Down

0 comments on commit da33cdc

Please sign in to comment.