Sign Up
Go Pro Sign Up Login

Buy Now and unlock this series

$

49

.99

$

29

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

Connecting To MongoDB

We will now set up Mongo DB and connect it to our app using Mongo Atlas.
https://www.mongodb.com/
npm install —save mongodb

Downloads

Become a pro to download code and videos

Comments

Hartwig

30 days ago

@Astral Born thanks.

User avatar

Astral Born

5 months ago

It may be worth noting you may need to wrap process.env.MONGO_URL with encodeURI() if your MongoDB password contains special characters.

Like so: const url = encodeURI(process.env.MONGO_URL);

Alternatively, store the URI encoded value in the .env file.

Want to join the conversation?

Become a Pro member today!