Run npm install mongodb command in your application directory. For example, nodejsapp folder is the application directory.
The folder structure inside the directory will look like :
nodejsapp
├─────────── node_modules <-- All the node modules installed using npm comes here -->
| ├──────────── .bin
| ├──────────── express
| └──────────── mongodb
├─────────── app <-- holds all our files for node components (models, routes)-->
├─────────── config <-- all our configuration will be here -->
├─────────── public <-- holds all our files for our front-end application -->
├─────────── server.js <-- Node configuration -->
The node_modules folder is created when you use npm command in the application directory.
This is a better way to organize the node packages for a project.
npm initwill give you a good starting point. After that,npm installis your friend. See guide.