Closed 6wukong6 closed 3 years ago
nodejs version is : v14.15.3 my config is :
module.exports = { apps: [ /** * Colyseus processes */ { name: 'colyseus-app', script: 'index.ts', exec_interpreter: "ts-node", watch: false, instances: 3, exec_mode: 'fork', port: 8080, env: { NODE_ENV: 'development', DEBUG: 'colyseus:errors,colyseus:matchmaking' }, }, /** * Proxy process */ { name: 'proxy', script: './node_modules/@colyseus/proxy/bin/proxy', instances: 3, // os.cpus().length, exec_mode: 'fork', //fork is from pm2-example, but in readme it's cluster, cluster not work too env: { // Required options: REDIS_URL: 'redis://:183a19e6b1e6e025@127.0.0.1:9030/0', // // SSL (optional) // SSL_KEY: "/Users/endel/.localhost-ssl/localhost.key", // SSL_CERT: "/Users/endel/.localhost-ssl/localhost.crt", } }], };
then run npm start
npm start
pm2 output is :
what should I do?thanks.
I found the problem. use pm2 delete all first. by the way proxy scale use cluster not fork.the demo code is wrong.
pm2 delete all
nodejs version is : v14.15.3 my config is :
then run
npm start
pm2 output is :
what should I do?thanks.