Ticket : Connection .env file

If I have this cluster :

Is the .env file correct?

Ticket: Connection

Rename this file to .env after filling in your MFLIX_DB_URI and your SECRET_KEY

Do not surround the URI with quotes

SECRET_KEY=super_secret_key_you_should_change
MFLIX_DB_URI=mongodb+srv://m220student:m220password@mflix-4xvac.mongodb.net/test
MFLIX_NS=mflix
PORT=5000

Thanks a lot !!

Xavi

It seems correct to me. Also, make sure you change super_secret_key_you_should_change.

If the connection test does not work, make sure IP is whitelisted and firewall is not blocking the request.

Kanika

Hi,

How can I know if Ip is whitelisted?

Many thanks,

Xavi

Go to cloud.mongodb.com. Login to your cluster.

Click on Security -> IP Whitelist -> Add IP Address

Kanika

Hi Kanica,

Is this ok?

Thanks !!

Yes, it is correct!

Kanika

Hi KAnica,

Finally I’ve tried to connect laptop to Internet with my mobile and now it’s working…

Thanks for all !!!

Sincerely !!!

Xavi


Can you tell me please tell me why app is crashing i followed all the procedure given in README.rst file.
Thank you!

You got a MongoParseError: URI malformed, cannot be parsed.

You did one of the step wrong or you have a typo in your URI.

1 Like