I can not access a site served by the Grunt server from another computer on the LAN

2

I'm trying to access my Grunt-served development environment and the site just does not open. It is as if it did not exist. Among other features I'm using livereload , jshint and karma but I think the problem is not related to that.

My server settings are:

// The actual grunt server settings
connect: {
  options: {
    port: 9010,
    hostname: 'localhost',
    livereload: 35729
  }
...
    
asked by anonymous 27.05.2014 / 02:32

1 answer

2

This problem can be easily solved.

Change to the following arquivo Gruntfile.js setting:

From hostname: 'localhost'

By hostname: '0.0.0.0' .

When you enter localhost , only address in the 127.0.0.* range is allowed.

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

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

    
27.05.2014 / 02:42