i should probably point out that i'm inexperienced user first, and my issue is that the 'hostname' property can't have any values assigned except for an empty string(''), '0.0.0.0' and 'localhost'. I getting: Fatal error: getaddrinfo ENOTFOUND. What am i doing wrong?
If get it right, i can change the adress that i'm usually typing in the address bar, so instead 'localhost' i could have typed 'example.com' or something like that.
As i mentioned above i've assigned it different values but only three of them have worked. so why this '*' isn't working.
Here is My Gruntfile.js:
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
files: ['*.js'],
options: {
livereload: true
}
},
markup: {
files: ['*.html'],
options: {
livereload: true
}
},
stylesheets: {
files: ['*.css'],
options: {
livereload: true
}
}
},
connect: {
server: {
options: {
hostname: '*',
port: 2000,
base: '.'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('default', ['connect','watch']);
};
Working on Ubuntu 12.04 64bit
NodeJs 0.10.17
npm 1.3.8
GruntJs 0.4.1
grunt-contrib-connect 0.3.0
It is because grunt is attempting to bind to that address as a Server. It is not possible to bind as a server to arbitrary IP addresses or domain names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With