【发布时间】:2015-05-06 16:18:29
【问题描述】:
我为 Yeoman 生成的 AngularJs 应用程序配置了 Gruntfile.js。我已将协议更改为 https。所以它现在为https://localhost:9000 上的所有文件提供服务。
...
connect: {
options: {
port: 9000,
protocol: 'https',
hostname: 'localhost',
livereload: 35729,
...
所以它现在为https://localhost:9000/ 上的所有文件提供服务。我还在 livereload 配置中添加了证书和密钥:
livereload: {
options: {
key: grunt.file.read('livereload.key'),
cert: grunt.file.read('livereload.crt'),
但它仍然没有从 https://localhost:35729/livereload.js?snipver=1 Failed to load resource: net::ERR_CONNECTION_CLOSED 加载 livereload.js 我可以打开 http 连接并在浏览器中加载 livereload.js http://localhost:35729/livereload.js?snipver=1
为了在 https 上提供 livereload.js,我应该进行哪些更改?
【问题讨论】:
标签: gruntjs yeoman yeoman-generator grunt-contrib-watch