【问题标题】:hot to run grunt serve with grunt-foreverhot to run grunt serve with grunt-forever
【发布时间】:2016-07-01 17:13:12
【问题描述】:

我使用 yeoman 角度生成器,我需要永远运行 grunt serve (grunt-forever) 我尝试过(gruntfile.js)这样的:

grunt.loadNpmTasks('grunt-forever');

grunt.initConfig({
  forever: {
      options: {
          index: 'app/scripts/app.js' (im not sure which file must be here)
      }
    },

 grunt.registerTask('serve', 'Compile then start a connect web server', function (target) {
    if (target === 'dist') {
      return grunt.task.run(['build', 'forever:server1:start']);
    }

 grunt.task.run([
  'clean:server',
  'wiredep',
  'concurrent:server',
  'postcss:server',
  'connect:livereload',
  'watch'
 ]);
});

当我尝试“grunt serve”或“grunt forever:start”时 - “verifying property forever.start 存在于配置中...错误

无法处理任务。 警告:缺少必需的配置属性“forever.start”。使用 --force 继续。” 我该怎么办?

【问题讨论】:

    标签: angularjs gruntjs yeoman grunt-forever


    【解决方案1】:

    您可以使用 pm2 在服务器上运行您的应用程序。看一下这个; https://github.com/Unitech/pm2

    【讨论】:

      猜你喜欢
      • 2015-05-19
      • 1970-01-01
      • 2016-01-23
      • 2015-07-28
      • 1970-01-01
      • 1970-01-01
      • 2014-04-15
      • 2016-01-05
      • 2014-04-03
      相关资源
      最近更新 更多