Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ozzy1865yUse click to save to a database, write a simple script to check that table periodically, easy peasy😂
-
@ozzy actually I have a script which opens notepad program. I am developing this project using nwjs, on the click of a button I want this script to be executed, I tried including the script in HTML file and call the function which has my script's code but it's not getting executed...
PS: I am not using any database. -
On click event sends websocket feedback to the server, on getting that feedback the server (node js socket listener.. think socket.io or something) just open/execute the file?
-
That sounds....
Are you sure you want to execute random node js scripts in the server? as input by the users? Absolutly sure?
then implemnt a simple rest api that accepts the file sent, and sends it to a dedicated executor that later publishes the result to the ui via websocket. -
I think they're wanting to execute a predefined script, not a user entered one. Of course... then it just sounds like any other button that calls back to the server...
-
@M1sf3t I want to open a TXT file in notepad on button click, I was able to open the TXT file in note using npm package but this works only when I run it in CMD, it doesn't works when I call the function on button click(event listener) from web... I figured that it needs to be executed as web doesn't execute the js file...
So I need a solution to this which will execute the file on button click
Related Rants
Anyone has an idea how to execute a nodejs file on button click of HTML?
rant
question
doubtingcomputingcapabilitiesforthefirsttime
stuck all the time
help me
doubt