##Inside executable file to start
#!/usr/bin/env node
//Define Node Native Modules
//Define Third-Party Modules
(function(){
"use strict";
var commandLineArguments = process.argv.slice(2);
})();
##Make file executable, set permissions
chmod u+x myNodeFunc.js
##Symlink to make available globally
$ cd /usr/local/bin && ln -s ~/path/to/myNodeFunc.js yourSymlinkNameHere
##Add /usr/local/bin to $PATH
View your path variable
bash $ echo $PATH
If needs to be added add
bash PATH=$PATH:/usr/local/bin
to your ~/.bashrc file
Once saved reload your .bashrc file
bash source ~/.bashrc
Or open a new terminal window
Then check $PATH to enusre it updated correcty
bash $ echo $PATH