Download online js file with requirement in node

when I try to load the js file using require in node I get the error message "I can not find the module" http://bit.ly/ProjectRedBoard '", This is the code I'm trying to execute,

var content = require("http://bit.ly/ProjectRedBoard");
content.run();

So basically, am I doing something wrong or do I need to upload files that are on the network?

Regards, Techhead55

EDIT: this link is now depreciating, and the final code is as follows

var XMLHttpRequest = require("xhr2");
var xhr = new XMLHttpRequest();
xhr.onload = function (){
    eval(xhr.responseText);
};
xhr.open("get", "https://googledrive.com/host/0BxIYopGUx_PROTIyOVo3ZEYtWW8/run.js", true);
xhr.send();
+4
source share
2 answers

You can try to download the file , then use it requireto enable it after the download is complete.

, , , , . .

+1

require .

0