npm i mongodb mongoose code example Example 1: npm mongoose $ npm install mongoose Example 2: mongoose npm $ npm install mongoose --save