m220JS Principle of Least Privilege - Can't get validation code

I used Atlas to create a new user and I can log via the shell with

mongo “mongodb+srv://mflix.iv6pd.mongodb.net/sample_mflix” --username mflixAppUser --password mflixAppPwd

I assume I should log out in the shell before “npm start” – I’ve tried both ways.

When I attempt to validate within the browser, I fail even though I’ve places the new user’s URI in .env :

MFLIX_DB_URI=mongodb+srv://mflix.iv6pd.mongodb.net/sample_mflix --username mflixAppUser --password mflixAppPwd

I’m suspicious about warning I’m getting from npm start. Here’s what I get before attempting validation:

… and here’s what it looks like after I attempt validation in the browser.

So I’m stuck. What other info can I provide? And should I attempt to resolve the npm warnings with an ‘npm update’ ?


Check your URI string.It is not in the correct format
Should be like

MFLIX_DB_URI = mongodb+srv://mflixAppUser:mflixAppPwd@xyz.mongodb.net/

1 Like

Hey Ramachandra – Thank you!

I had “corrected” it several attempts ago by just copying a string I had been using successfully on another test.

I want to add that when I commit blunders like this and spend a couple of hours reading and puzzling, I learn a great deal.