mongodb localhost connection string node js code example Example: mongodb nodejs connect localhost "mongodb://localhost:27017/MyDb"