Go Pro Sign Up Login
0 days 0 hrs 0 min 0 sec

Summer Sale

50% off Level Up Pro until you unsubscribe.
Get access to ALL 128 courses on Level Up Tutorials

This is your last chance to get Level Up Pro for $145/year.

or Learn More
Moon Moon

Buy Now and unlock this series







yours forever

Become a Pro and unlock everything




per month

Connecting To MongoDB

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


Become a pro to download code and videos


Alexander Swensen

3 months ago

It's pretty important to note that using "@" in your mongodb password causes an error. If using 1password either turn off special characters, or use the "Autogenerate Secure password" button.


12 months ago

@Astral Born thanks.

User avatar

Astral Born

over 1 year 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!