title: How do I add a custom script to my package.json file that runs a javascript file?
body: <p>I want to be able to execute the command <code>script1</code> in a project directory that will run <code>node script1.js</code>.</p>
  
  <p><code>script1.js</code> is a file in the same directory.  The command needs to be specific to the project directory, meaning that if I send someone else the project folder, they will be able to run the same command.  </p>
  
  <p>So far I've tried adding:</p>
  
  <pre><code>"scripts": {
      "script1": "node script1.js"
  }
  </code></pre>
  
  <p>to my package.json file but when I try running <code>script1</code> I get the following output:</p>
  
  <pre><code>zsh: command not found: script1
  </code></pre>
  
  <p>Does anyone know the steps necessary to add the script mentioned above to the project folder?</p>
  
  <p>*Note: the command can not be added to the bash profile (cannot be a machine specific command)</p>
  
  <p>Please let me know if you need any clarification. </p>