Unable to connect my mongodb database with nodejs file, tried every solution not a single one worked

PLEASE HELP, AM STUCK AND


Screenshot 2024-04-15 000143
NOT ABLE TO CONNECT MY NODEJS FILE WTH MONGODAB DATABASE

  1. HAVE CHECKED FOR SERVICES EVERYTHING IS RUNNING FINE
    2.WONT ABLE TO GET THE DATA FROM MY DATABASE USING MY NODE JS FILE
    3.ITS JUST SHOWING CANNOT / GET

Hi @Vishal_sahoo1,

Thanks for reaching out to the MongoDB Community forums :sparkles:

If you don’t specify the page you’re trying to access, like when your URL is http://localhost:3000, you’ll encounter the message "Cannot GET /". Ensure you include a page name, I guess in your case it will be http://localhost:3000/getUsers.

I hope it helps!

Best regards,
Kushagra

2 Likes

Hey Man! Thank you so much, while we are learning alone getting these types of errors is really demotivating, thank you so much once again

1 Like