When I install strapi via npm, then run "strapi new server" and then try to connect to mongodb atlas; It shows the following error.
(node:12564) 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.
⛔️ Connection test failed: failed to connect to server [oriapp-shard-00-01.pjvsw.mongodb.net:27017] on first connect [MongoNetworkError: connection 5 to oriapp-shard-00-01.pjvsw.mongodb.net:27017 closed at TLSSocket. (C:\Users\Sharm\AppData\Local\Temp\strapi236c8a243294\node_modules\strapi-connector-mongoose\node_modules\mongodb\lib\core\connection\connection.js:356:9) at Object.onceWrapper (events.js:422:26) at TLSSocket.emit (events.js:315:20) at TLSSocket.EventEmitter.emit (domain.js:483:12) at net.js:674:12 at TCP.done (_tls_wrap.js:567:7) { [Symbol(mongoErrorContextSymbol)]: {} }]
So , the solution to the above problem:
Thus one will be good to go.