title: How to deploy node_modules folder to production server?
body: <p>I making a <strong>very simple website</strong> (like pastebin) in PHP (LAMP server). This site uses jquery and bootstrap. I was using <code>bower</code> earlier, but I want to switch to using <code>npm</code> instead.</p>
  
  <p>My directory structure is like this:</p>
  
  <ul>
  <li>public
  
  <ul>
  <li>html 
  
  <ul>
  <li>index.php</li>
  <li>node_modules
  
  <ul>
  <li>jquery
  
  <ul>
  <li>dist
  
  <ul>
  <li>jquery.js</li>
  </ul></li>
  <li>plus <em>dozens of needless folders</em></li>
  </ul></li>
  <li>bootstrap
  
  <ul>
  <li>...</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>When I was using bower, I used to upload the whole bower_components folder to my FTP server. My node_modules folder is pretty large and contains hundreds of files and so I'm not sure if I should be uploading it?</p>
  
  <p>I guess I can just upload package.json and run <code>npm install</code> on the command line of my webserver after uploading, but will exposing node_modules folder to the public pose potential security risks?</p>