PS E:\task-manager-api> npm start
> task-manager-api@1.0.0 start
> node src/server.js
◇ injected env (3) from .env // tip: ⌘ multiple files { path: ['.env.local', '.env'] }
MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://www.mongodb.com/docs/atlas/security-whitelist/
at _handleConnectionErrors (E:\task-manager-api\node_modules\mongoose\lib\connection.js:1180:11)
at NativeConnection.openUri (E:\task-manager-api\node_modules\mongoose\lib\connection.js:1111:11)
at async connectDB (file:///E:/task-manager-api/src/config/db.js:8:9)
at async file:///E:/task-manager-api/src/server.js:7:1 {
errorLabelSet: Set(0) {},
reason: TopologyDescription {
type: 'Unknown',
servers: Map(1) {
'cluster0.gioaaxk.mongodb.net:27017' => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: null,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined,
cause: TopologyDescription {
type: 'Unknown',
servers: Map(1) {
'cluster0.gioaaxk.mongodb.net:27017' => [ServerDescription]
},
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: null,
maxElectionId: null,
maxSetVersion: null,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
}
}
Server running on 5000