when I type $ pm2 start --name chat-1 chat.index.js -- --name chat-1 --port 8080
groovy it works, then when I do: $ pm2 start --name chat-2 chat.index.js -- --name chat-2 --port 8081
it still goes to port 8080.
I have attempted to replicate solving the issue as here however, cannot due to the poster not explaining how that solved the issue.
I am using Express, Socket.io
in my app.js I have the variable set as:
const PORT = process.env.PORT || 8080;