Hey I've got a Nodejs file running on Heroku and I want to call various functions in an external file, but I'm not sure how to do it.
My external tool.js file looks like this:
var Tool = {}; //tool namespace
Tool.doSomething = function(a,b){}
Tool.doSomethingElse = function(a,b){}
How do I export this functionality to available in my nodejs file?
Presumably in my nodejs file I have something like:
import nodeTool = require('./tool.js');
Then I'd like to call it like:
var n = nodeTool.doSomething(a,b);
Any help is appreciate. Thank you.