代码之家  ›  专栏  ›  技术社区  ›  Jeet

执行配置文件app.json/process.yml时未找到Pm2脚本

  •  2
  • Jeet  · 技术社区  · 7 年前

    app.json process.yml 对于我非常简单的NodeJS应用程序。应用程序是一组脚本,在服务器中作为后台作业运行,因此我想使用 pm2 configuration file 看起来像-

    {
     "apps":[
      {
        "name":"dodge-report",
        "script":"dodge-report/dodge-report.js local"
      },
      {
        "name":"dodge-filter",
        "script":"dodge-filter/dodge-filter.js local"
      }
     ]
    }
    

    pm2 start app.json 其中一个应用程序运行正常,而另一个则抛出错误-

    enter image description here

    1 回复  |  直到 7 年前
        1
  •  2
  •   yodebu    7 年前

    如果dodge filter/dodge-filter.js路径是相对于pm2 conf执行的, 请使用以下路径: ./dodge-filter/dodge-filter.js

    /var/www/html/dodge-filter/dodge-filter.js
    
    推荐文章