Load JavaScript file inside another JavaScript file

I'm using node.js and socket.io and doing a server/client thing. On my Server, is since its' not on a webpage, is there a way I can load the latest file (or latest jQuery?) so I can use jQuery functions inside my Server js file.

Thanks

You can install jQuery on your server like that:

npm install jquery

And then you need to declare your jQuery variable like this:

var $ = require('jQuery');

Now you can use jQuery like you are used too. More information here.

You can load it as text and eval(jquery) will let you use jquery