I’m trying to execute a Linux command from a webpage with node.js, socket.io and (I think…) PHP. I watched this YouTube video, and I’d like to do the same thing, but I don’t know how.
Could you give me an example?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The link to their implementation is available in the GitHub repo linked in the video – mirceageorgescu/raspi-tank.
node.js is perfectly capable of running programs. A draft could look like the following.
Server
Client
Information on how to start the socket on the server or connect to it from the client-side is available on socket.io.