How do you include/import JavaScript file(s) in node.js from an external URL?
I have tried include("http://example.com/script.js");
which did not work. I have seen Load and execute external js file in node.js with access to local variables. However I want to include a script from another domain.
I want to have something similar to this in HTML.
<script src="http://example.com/script.js"></script>
<script>
//do stuff
</script>
I am using Express.js.