ubscription Tracker API is running http://localhost:5500
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
Subscription Tracker API is running http://localhost:5500
Error connecting to database: MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
at _handleConnectionErrors (C:\Users\David\Documents\GitHub\subscription-tracker\node_modules\mongoose\lib\connection.js:1154:11)
at NativeConnection.openUri (C:\Users\David\Documents\GitHub\subscription-tracker\node_modules\mongoose\lib\connection.js:1085:11)
at async connectToDatabase (file:///C:/Users/David/Documents/GitHub/subscription-tracker/database/mongodb.js:11:5)
at async Server.<anonymous> (file:///C:/Users/David/Documents/GitHub/subscription-tracker/app.js:30:3) {
errorLabelSet: Set(0) {},
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
servers: Map(1) { 'localhost:27017' => [ServerDescription] },
stale: false,
compatible: true,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
setName: 'rs0',
maxElectionId: new ObjectId('7fffffff0000000000000001'),
maxSetVersion: 1,
commonWireVersion: 0,
logicalSessionTimeoutMinutes: null
},
code: undefined
}
[nodemon