我用 Yeoman 生成了我的 Angular 1.0 应用程序。gruntfile 不包含快速服务器配置:
connect: {
options: {
port: 9000,
// Change this to '0.0.0.0' to access the server from outside.
hostname: 'localhost',
livereload: 35729
},
livereload: {
options: {
open: true,
middleware: function (connect) {
return [
connect.static('.tmp'),
connect().use(
'/bower_components',
connect.static('./bower_components')
),
connect().use(
'/app/styles',
connect.static('./app/styles')
),
connect.static(appConfig.app)
];
}
}
},
如何向其中添加快速服务器配置?我可以用 grunt-contrib-connect 做到这一点吗?