this might be weird but what I am trying to do is this:
I have a node.js script which does some stuff, like reading some data from a file, doing some stuff (converts it to some format) and then writes processed data to another one while sends the same data to an api with node-fetch.
What I want to do is,
- I am building a vue.js web app and want to run this web app locally (maybe I will put on a server later). Simply, when the user presses a button, it will run the above-mentioned node.js file.
I am not sure, maybe it is easy but could not do it and could not find an exact solution from googling.
thanks in advance
I tried to "import" the node.js app but it gave error as there is no default export statement... there is Q&A Running a node.js file from website. as far as I understand this is not the exact thing I am looking... In this answer (I loved it), there is a server.js which calls a function from another node.js file...
In my case, I have a vue.js web app, which will execute the pre-defined node.js file...