【发布时间】:2019-11-22 08:32:24
【问题描述】:
当我使用 grunt-contrib-connect 为我的项目提供服务时,我需要它使用 https 运行,并且在浏览器中的根路径需要是: https://localhost/
我不熟悉如何使用 grunt-contrib-connect 中的代理选项进行设置。
我的 grunt.initConfig 设置是:
connect: {
server: {
options: {
port: 80,
base: 'dist',
protocol: 'https',
livereload: true,
keepalive: true,
debug: true,
hostname: 'localhost',
open: true
}
}
},
```
This serves the project to https://localhost:80/
I will finish setting up livereload once this is working correctly.
Thanks for your help.
【问题讨论】: