Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

livereload with mkcert file pairs for https #573

Open
dwlamb opened this issue Dec 17, 2023 · 0 comments
Open

livereload with mkcert file pairs for https #573

dwlamb opened this issue Dec 17, 2023 · 0 comments

Comments

@dwlamb
Copy link

dwlamb commented Dec 17, 2023

I am trying to configure grunt-contrib-watch livereload to work with a local development server which has https characteristics using mkcert. Not succeeding finding an example specific to mkcert, I tried adapting the example from the documentation for SSL key/cert file pairs. This:

watch: {
  css: {
    files: '**/*.sass',
    tasks: ['sass'],
    options: {
      livereload: {
        host: 'localhost',
        port: 9000,
        key: grunt.file.read('path/to/ssl.key'),
        cert: grunt.file.read('path/to/ssl.crt')
      }
    },
  },
},

adapted to:

watch: {
  css: {
    files: '**/*.sass',
    tasks: ['sass'],
    options: {
      livereload: {
        host: 'localhost',
        port: 9000,
        key: grunt.file.read('path/to/test.com-key.pem'),
        cert: grunt.file.read('path/to/test.com.pem')
      }
    },
  },
},

It did not work. grunt returned the following.

Error: Unable to read "path/to/test.com-key.pem" file (Error code: ENOENT).
Warning: Task "default" not found. Use --force to continue.

What is the method for using livereload on https sites using mkcert?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant