【问题标题】:nodejs loopback api is not running while trying to run in pm2nodejs loopback api在尝试在pm2中运行时没有运行
【发布时间】:2018-12-01 23:29:50
【问题描述】:

我的 pm2 生态系统.config.js 配置如下: HGBackend 未运行。其他在pm2运行

module.exports = {
  apps : [
    {
     name      : "HGBackend",
     cwd       : "hgbackend/server",
     script    : "config.json"
    },
    {
    name       : "HGBlockchain",
    cwd        : "hgblockchain/localgrammes",
    script     : "index.js"
   // args       : "start:staging"
   // instances  : 4,
   // exec_mode  : "cluster"
  },
  {
    name   : "HGWeb",
    cwd    : "hgweb/src/server",
    script : "server.js",
    description: ""
  }

]}

除 HGBackend 外,所有功能均正常工作。 HGBackend 是环回 api。其他的是 react 和 express api。 不运行 HGBackend 的原因是什么?谁能帮帮我?

【问题讨论】:

    标签: express pm2 loopback


    【解决方案1】:

    对于HGWebHGBlockchain 应用程序,您正在script 配置中执行相关的server.js。对于HGBackend,您将config.json 作为script 传递。对于Loopback,还需要执行server.js

    【讨论】:

      【解决方案2】:

      是的,我已经更正了。 fatasource.json 文件中的实际问题。谢谢

      【讨论】:

        猜你喜欢
        • 2015-08-21
        • 1970-01-01
        • 1970-01-01
        • 2018-10-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-05-06
        • 2021-11-05
        相关资源
        最近更新 更多