I cannot access website served by Grunt server from another computer on LAN

Asked

Viewed 74 times

2

I’m trying to access my development environment served by Grunt and the site just doesn’t open. It’s like it doesn’t exist. Among other things I’m using livereload, jshint and karma but I don’t think the problem is related to that.

My server settings are:

// The actual grunt server settings
connect: {
  options: {
    port: 9010,
    hostname: 'localhost',
    livereload: 35729
  }
...

1 answer

2

This problem can be solved easily.

Switch in your configuration arquivo Gruntfile.js the following:

Of hostname: 'localhost'

For hostname: '0.0.0.0'.

When you put localhost address is only allowed on the track 127.0.0.*.

To use addresses such as 192.168.0.* you must specify the other mask.

NOTE: this was posted as an error in the Grunt discussion file but it is actually just a documentation problem that has already been solved in the newer versions.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.