I have a node.js server running on a VPS and I want to use a js script that is served from another server, something like:
http://example.com/api/js
How do I load this script and use it in my node.js file?
Thanks!
I have a node.js server running on a VPS and I want to use a js script that is served from another server, something like:
http://example.com/api/js
How do I load this script and use it in my node.js file?
Thanks!
Use GGScript.
const GGScript = require("ggscript")
GGScript("http://example.com/api/js").then(() => {
console.log("Finished loading file.")
})