6

最初に、私は経験の浅いユーザーであることを指摘する必要があります。私の問題は、「ホスト名」プロパティには、空の文字列 ('')、「0.0.0.0」、および「localhost」以外の値を割り当てることができないことです。取得:致命的なエラー: getaddrinfo ENOTFOUND。私は何を間違っていますか?

うまくいけば、通常アドレス バーに入力しているアドレスを変更できるので、代わりに「localhost」の代わりに「example.com」などと入力することもできます。

上で述べたように、異なる値を割り当てましたが、そのうちの 3 つだけが機能しました。では、なぜこの「*」が機能しないのでしょうか。

ここに私の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']);

};

Ubuntu 12.04 64ビットでの作業

NodeJs 0.10.17

npm 1.3.8

GruntJs 0.4.1

うなり声-contrib-接続 0.3.0

4

1 に答える 1