0

I have successfully installed mongodb on my windows and its running but when i connect the connect remains for 2 minutes and then an error will pop

   error: MongoNetworkError: connect ECONNREFUSED ::1:27017

i have changed the ::1 to 127.0.0.1 and it worked successfully until I tried to access the .env file

uninoved
  • 1
  • 1
  • 1
    So, the error in the title and text is solved? ... but you have a new error when you _"tried to access the .env file"_? What's the full error text? How do you try to access the file? – rickhg12hs Jan 28 '23 at 00:41
  • thanks for the concern i have changed the ::1 to 127.0.0.1 and remove a spare port from the .env file and my data base connection is cool but i wish i could know why it fails to run on the default port ::1 – uninoved Jan 28 '23 at 01:04
  • The MongoDB server can communicate over IPv6, but it needs to be enabled (either on the commandline or in the config file) - the default is disabled. – rickhg12hs Jan 28 '23 at 01:21

0 Answers0