title: Run js file in any directory using $PATH
body: <p>I created a Linux executable file using pkg library (npm), what I'm trying to do is to include the path into $PATH var in order to be able to execute this file in any directory through the terminal as Node.js does</p>
  <p>The steps to replicate what I'm looking for:</p>
  <ol>
  <li>create a .js file</li>
  <li>insert some code</li>
  <li>install pkg library through <code>npm i -g</code> pkg</li>
  <li>run <code>npm pkg</code> to get executable files</li>
  <li>include executable file path into <code>$PATH</code> variable to be able to run my .js file in any directory (stuck in this step)</li>
  <li>get current directory where .js file was executed</li>
  </ol>