I made a javascript file mytool.js
, it has some dependencies (in package.json).
Now I can execute typing in
~/mynodes/mytool $ node mytool
But if I change the working directory I can't use this command anymore because previously it was run locally. What I want to achieve is to be able to just type :
~$ mytool
(wherever I am in my system's filesystem and without typing node
before).
Should I install it manually ?
If yes, where is the common location to install a personal nodejs script in a unix-like system ?
Or is there a npm-like command to install a personal script system wide ?