So, I have my Node.js script. And I have some HTML page which contains HTML with JavaScript (jquery) in it. How can I load it and get result of execution of JavaScript on this page?
The usual way to run a Node. js program is to run the globally available node command (once you install Node. js) and pass the name of the file you want to execute. While running the command, make sure you are in the same directory which contains the app.
You can run your JavaScript file from your terminal only if you have installed Node. Js in your system.
In Node. js and Express applications, res. sendFile() can be used to deliver files. Delivering HTML files using Express can be useful when you need a solution for serving static pages.
You can check the zombie.js project : http://zombie.labnotes.org/
It should load the page mostly as in a real browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With