DEV Community

Send Shell script server output to react client

vaibhav singh on February 10, 2020

I'm new in MERN & I have a shell script to upload some data to mongodb, from nodejs i have to execute shellscript and show it to client side in...
Collapse
 
failuree profile image
Avinash Srivastava

What you can do is create a web service, that you will call with your React JS application. This web service will execute the script directly on the server and when it's done you can return data to display on your React JS application.

Collapse
 
vaibbhav profile image
vaibhav singh

I have shared code ref. above, i need to show event listing on client side(React) not the complete result once.

Collapse
 
dance2die profile image
Sung M. Kim

Hi vaibhav. Can I request you to format the code snippet in the post by referring to the Editor Guide?

because people tend to help more when seeing highlighted code snippets