node.js - Not able to connect to mongodb when start node server -


i trying run node app locally on vm.

when running command:

sudo node_env= xyz port=80 node server/app.js

i'm getting error:

/node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/mongo_client.js:378 throw err ^ error: connection closed @ null. (/node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/connection/server.js:605:24) @ emit (events.js:92:17) @ null. (/node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:155:15) @ emit (events.js:98:17) @ socket. (//node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/connection/connection.js:528:12) @ socket.emit (events.js:95:17)

my mongodb running fine , can connect local db robomongo.

any highly appreciated on this.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -