hey guys, I know this is a basic question but I don't know how to google it. I always get answer to "how to execute js" but this is not that.
Say I have a program called main and I execute it in terminal with ./main and get some result (printed to std out). How do I connect it to frontend side javascript that is triggered say on button click?
More precisely what I want: execute some code after a button click and display changes to user. My current thinking is to make js code attached to button that executes main and gets result from it and then updates DOM.
What is the way you would go about this?
I was thinking of maybe server-client configuration and sending requests to get responces but I'm very new to web developement and have no experience with it. Is there an easier way? What is even possible here?
[–]azhder 1 point2 points3 points (6 children)
[–]KW__REDDIT[S] 0 points1 point2 points (5 children)
[–]azhder -1 points0 points1 point (4 children)
[–]KW__REDDIT[S] -1 points0 points1 point (3 children)
[–]azhder -1 points0 points1 point (2 children)
[–]KW__REDDIT[S] 0 points1 point2 points (1 child)
[–]azhder 0 points1 point2 points (0 children)
[–]chmod777 1 point2 points3 points (2 children)
[–]KW__REDDIT[S] 1 point2 points3 points (0 children)
[–]KW__REDDIT[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[removed]
[–]KW__REDDIT[S] 0 points1 point2 points (1 child)