-3

I have several shell scripts and I would like to execute them by clicking on a button in the client side. How can I manage to do this?

1 Answers1

2

You've tagged this and so:

  1. Create an HTTP server with Node. You can use Express for this.
  2. Create a post route that will run the shell script
  3. Use a child process to run that shell script
  4. Attach an event handler to your button
  5. Have the event handler make an HTTP POST request to your server
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335