Hi, I think MongoDb installed on your system is not running. Please run that first and then try to execute the program.
On Sun, Jul 26, 2020 at 5:39 AM Aman Kr Sharma <aman.sharma9...@gmail.com> wrote: > I am trying to connect with mongodb database but it throws some kind of > error I am unable to understand > > > (node:94165) DeprecationWarning: current Server Discovery and Monitoring > engine is deprecated, and will be removed in a future version. To use the > new Server Discover and Monitoring engine, pass option { > useUnifiedTopology: true } to the MongoClient constructor. > (Use `node --trace-deprecation ...` to show where the warning was created) > MongoNetworkError: failed to connect to server [ > cluster0-shard-00-00.lpcoo.mongodb.net:27017] on first connect > [MongoNetworkError: connection 5 to > cluster0-shard-00-00.lpcoo.mongodb.net:27017 closed > at TLSSocket.<anonymous> > (/home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/connection.js:372:9) > at Object.onceWrapper (events.js:422:26) > at TLSSocket.emit (events.js:315:20) > at net.js:670:12 > at TCP.done (_tls_wrap.js:554:7)] > at Pool.<anonymous> > (/home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/topologies/server.js:438:11) > at Pool.emit (events.js:315:20) > at > /home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/pool.js:562:14 > at > /home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/pool.js:1009:9 > at callback > (/home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/connect.js:97:5) > at > /home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/connect.js:124:7 > at _callback > (/home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/connect.js:349:5) > at Connection.errorHandler > (/home/aman/Documents/Coding/nodejs/expressjs_ejs_mongodb/node_modules/mongodb/lib/core/connection/connect.js:365:5) > at Object.onceWrapper (events.js:422:26) > at Connection.emit (events.js:315:20) > > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/687e014b-34fd-415e-b5b6-8d92a559c131o%40googlegroups.com > <https://groups.google.com/d/msgid/nodejs/687e014b-34fd-415e-b5b6-8d92a559c131o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Regards Rahul Deewan -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CALMq5hL%3D548gAdk4mCKx2ouY8P-fJLroLAuAGHyBZhWUs5gWOw%40mail.gmail.com.