我已经像这样设置了 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 完成吗?还是我需要添加一些其他代理/中间件?
有人有这种设置的简单示例吗?