1
votes

I followed this tutorial: http://www.gilluminate.com/2014/06/10/livereload-ssl-https-grunt-watch/

My Gruntfile.js looks like this:

module.exports = function(grunt) {

grunt.initConfig({
    jshint: {
        files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
        options: {
            globals: {
                jQuery: true
            }
        }
    },
    watch: {
        css: {
            files: '**/*.sass',
            tasks: ['sass'],
            options: {
                livereload: {
                    port: 9000,
                    key: grunt.file.read('ssl/livereload.key'),
                    cert: grunt.file.read('ssl/livereload.crt')
                    // you can pass in any other options you'd like to the https server, as listed here: http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
                }
            }
        }
    }
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('default', ['jshint']);

};

I added

 <script src="//localhost:9000/livereload.js"></script> 

at the end of my index.html file.

My goal is to run livereload over httpS: port 9000. Maybe am I missing some part, like "run Grunt to make it load to the grunt file"?

The error I get is:

GET https://localhost:9000/livereload.js net::ERR_CONNECTION_REFUSED

1
did you find an answer for your question?batmaniac7
no #maddog. I didn't unfortunately. I moved to another project after some time for other reasonsdragonmnl
thanks for getting back :)batmaniac7

1 Answers

-1
votes

Grunt-contrib-watch uses tiny-lr@^0.2.1 which doesn't support SSL, someone needs to make a pull request to upgrade tiny-lr.