title: Safe way to load third party module in NodeJs application
body: <p>I am quite new in NodeJs and here is my issue:</p>
  <p>I am developing a small app using Express.
  In this app, I want to open a door for third party to install a kind of plugin. The idea is I have a &quot;plugin&quot; folder and they can create a plugin with a bootstrap file like &quot;bootstrap.js&quot;
  From this file, they can define route...etc.
  The main application will crawl the plugin folder and load the plugin automatically by requiring &quot;bootstrap.js&quot; file.</p>
  <p>The problem is from the &quot;bootstrap.js&quot; file they can access everything like the app, request, route object by requiring Node module and modify them.
  I want to prevent this from happing. I don't want the plugin to have access to main objects (Express app, request, route. ...) because it could make the application a mess.</p>
  <p>Is there any way in Node when I can load a js file and prevent that file to execute something not allowed?</p>
  <p>Thank you so much for your help</p>