I´m writing a Web MMO with Node.js and for debug and maintenance reasons i would love to have the ability to open my SSH connection, where i also start my server, and write a command like "logout all". So what are my options to get command prompt input and use it while my server runs?
Example: I start my server with "node app.js" - server starts. Now i want to write something into the command prompt - how do i get said input so i can use it in my code?
I was trying to read into node.js-readline but i cant seem to find much about it and everything that i found about it needs a "question" to be asked so it can get the input.
I would love to have something like this: var command = getCommandlineInput(); //command = "logout all" It need to get any input any time. A callback function would be good aswell, so i can direktly run it throu a checkCommand() function.