I'm attempting to make a small node executable which has the ability to open a remote shell to a http server. It seems simple enough logically but what would be the best practice in implementing this?
1) Start an incremental Ajax request every 10 or so seconds, or use something else for communicating to the server like WebRTC.
2) Open a command line using Node API
3) Listen for commands from server URL
4) When a command is received via Ajax or WebRTC? Pipe it into the command line
5) Send the command line response back.
This shell will be for administrative purposes.
I can't think of a good way of doing this, I've checked npm and it would seem there are some basic command line modules for node js but nothing that has this functionality.
Aucun commentaire:
Enregistrer un commentaire