【发布时间】:2014-02-19 11:04:10
【问题描述】:
我已经像这样设置了 grunt connect:
connect: {
options: {
port: 9000,
livereload: 35729,
hostname: 'localhost'
},
livereload: {
options: {
open: true,
base: [
'app'
]
}
}
}
效果很好 - 将我的 index.html 页面加载为:
http://localhost:9000
但是,为了使其与在生产中加载的方式保持一致,我希望它在加载时添加额外的上下文路径,例如:
http://localhost:9000/myappcontext/secured
这可以简单地使用 grunt-contrib-connect 完成吗?还是我需要添加一些其他代理/中间件?
谁有这种设置的简单示例?
【问题讨论】:
-
您是否使用 grunt-contrib-watch 来处理实时重新加载?
标签: gruntjs grunt-contrib-connect