I'm trying to include some libraries in from some server scripts that I'm running from the Mac Terminal (command line). This will not be run in a browser - I'm using Parse Cloud Code for my iOS app's backend. Any ideas why the following code would not work, whereas it does work in Google Chrome?
document.write('<script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script>');
document.write('<script src="https://raw.github.com/carlo/jquery-base64/master/ jquery.base64.min.js" type="text/javascript"></script>');
document.write('<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/hmac-sha1.js" type="text/javascript"></script>');
Running this from the terminal gives the error: {"code":141,"error":"Uncaught ReferenceError: document is not defined"}.