Question

A process in nodejs automatically repeat for infinite time

When i start a index.js file through command line

node index.js

It starts but, it print the result multiple time even a single user is connected. Result is:-

7544816137 is connected
gX8dcI27WNRNww6QAAAd
gX8dcI27WNRNww6QAAAd
connected as id 277
7544816137 is connected
gX8dcI27WNRNww6QAAAd
gX8dcI27WNRNww6QAAAd
connected as id 277

This happens on digital ocean server only, It doesn’t happen on localserver. Please tell me a way to resolve this problem

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer