V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
xiaoyanbot
V2EX  ›  问与答

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

  •  
  •   xiaoyanbot · Mar 9, 2018 · 2939 views
    This topic created in 2971 days ago, the information mentioned may be changed or developed.

    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 replies    2018-03-09 16:27:51 +08:00
    chairuosen
        1
    chairuosen  
       Mar 9, 2018
    是不是目录问题,设置一下 cwd
    http://pm2.keymetrics.io/docs/usage/application-declaration/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   998 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 19:10 · PVG 03:10 · LAX 12:10 · JFK 15:10
    ♥ Do have faith in what you're doing.