2016-06-11 43 views
0

我与Yeoman生成了我的angular 1.0应用程序。 gruntfile不包含快速服务器配置:如何在grunt中启动express服务器?

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做到这一点吗?

回答

相关问题