V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xiaoyanbot
V2EX  ›  问与答

部署阿里的这个 rap2 后端服务的时候,经常遇到后端挂。 请问这个用 pm2 如何部署?

  •  
  •   xiaoyanbot · 2018-03-09 16:19:52 +08:00 · 2683 次点击
    这是一个创建于 2405 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://github.com/thx/rap2-delos

    就是这个后端服务, 我直接用 pm2 start /root/rap2-delos-master/dist/dispatch.js 会直接报错

    
    ┌──────────┬─────────┬─────────┬────┬─────┬────────┐
    │ Name     │ mode    │ status  │ ↺  │ cpu │ memory │
    ├──────────┼─────────┼─────────┼────┼─────┼────────┤
    │ dispatch │ cluster │ errored │ 15 │ 0%  │ 0 B    │
    │ dispatch │ cluster │ errored │ 15 │ 0%  │ 0 B    │
    │ dispatch │ cluster │ errored │ 15 │ 0%  │ 0 B    │
    │ dispatch │ cluster │ errored │ 15 │ 0%  │ 0 B    │
    └──────────┴─────────┴─────────┴────┴─────┴────────┘
    
    
    
    
    1 条回复    2018-03-09 16:27:51 +08:00
    chairuosen
        1
    chairuosen  
       2018-03-09 16:27:51 +08:00
    是不是目录问题,设置一下 cwd
    http://pm2.keymetrics.io/docs/usage/application-declaration/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   969 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:26 · PVG 04:26 · LAX 13:26 · JFK 16:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.