title: How do I run a Node.js script from within another Node.js script
body: <p>I have a standalone Node script called <code>compile.js</code>. It is sitting inside the main folder of a small Express app.</p>
  
  <p>Sometimes I will run the <code>compile.js</code> script from the command line. In other scenarios, I want it to be executed by the Express app.</p>
  
  <p>Both scripts load config data from the <code>package.json</code>. <code>Compile.js</code> does not export any methods at this time.</p>
  
  <p>What is the best way to load up this file and execute it? I have looked at <code>eval()</code>, <code>vm.RunInNewContext</code>, and <code>require</code>, but not sure what is the right approach.</p>
  
  <p>Thanks for any help!!</p>