Search code examples
webpack-dev-serverparallels

hosting on webpack dev server accessing from parallels


I am working on an app that for testing is hosted on web pack dev server.

I am using the following settings in my web pack.config file

devServer: {
  host: 'mysite.local.co.uk',
  port: '14500'
}

I have the following set in my hosts file on Mac

0.0.0.0 mysite.local.co.uk

I can now access the site on my Mac using http://mysite.local.co.uk:14500

I am trying to use a similar config to access the site from a windows 7 parallels desktop I have created.

I have done the following:

  1. Set parallels network to shared

  2. Set the hosts file windows to

    [My Mac IP] mysite.local.co.uk

When I attempt to access the site from parallels I get no response

I have pinged [My Mac IP] and get reply's as would be expected.

I have tried setting host to 0.0.0.0 and as suggested here Github Issue

I am at a loss for how to make this work any suggestions would be greatly accepted


Solution

  • On macOS Mojave, go to Settings -> Sharing to see your Mac's network name.

    It should say something like "Computers on your local network can access your computer at: YourComputerName.local". You can also change this name to something easier to remember and type.

    On my Mac, this allows me to access my dev server via Parallels, Windows 10 and Chrome over port 8080. Not sure if the port matters.