0

I have the following options for grunt-contrib-connect. I am able to run connect fine on my own desktop.

How should I allow other devices (other pcs, tablets or phones) to access my desktop?

I've tried xip.io but I can't seem to get it to work.

Help is much appreciated!

connect: {
  options: {
    port: 9000,
    // Change this to '0.0.0.0' to access the server from outside.
    hostname: '*',
    base: 'public',
    livereload: 35729,
  },
}
Zell Liew
  • 162
  • 9

1 Answers1

4

Change your hostname to '0.0.0.0' as stated in the inline comment so it should now be:

connect: {
  options: {
    port: 9000,
    hostname: '0.0.0.0',
    base: 'public',
    livereload: 35729,
  },
}

Also a handy way to extract your local ip address from your connected network to be used with xip:

How to I get the primary IP address of the local machine on Linux and OS X?

So your xip.io URL that you will load on your mobile devices would be for example:

192.168.1.xxx.xip.io:9000 where x is the unique integer binded to your host device.

Community
  • 1
  • 1
Rish
  • 154
  • 8