Considering this is the file structure of my working directory
|-- bower.json
|-- lib
| |-- foo1.js
| |-- foo2.js
| `-- foo3.js
|-- node_modules
| |-- body-parser
| |-- bower
| |-- express
| `-- md5
|-- package.json
|-- runserver.sh
|-- server.js
`-- test
How am I supposed to load the third party library modules ( present in ./node_modules ) in my modules that I write in ./lib directory ?
require("body-parser");this will at first check in your local node_modules, if not found it will check in global node_modules directoryvar express = require('express');