Answer the question
In order to leave comments, you need to log in
How to ssh into a server and display a running nodejs script?
Good day, actually the question is in the title, I have a script that works in the background (socket server), it displays various real-time data in the console, in fact, how to see this console after I connected via ssh to the server without restarting the script.
Answer the question
In order to leave comments, you need to log in
+ to other answers, specifically for the node, there is another solution:
Run through pm2 and then watch the logs through it too
initially run the script in screen or tmux, which, when you disconnect from the console, will simply detach from it, and the next time you connect to the server, you can connect to the previous session
Depends on how this script is run.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question