Connect Glitch to mLab


I’ve opened up a Mongo Db account via mondoDb.Atlas. Where do I find the URI string to connect to Glitch?

The URI provided by FreeCodeCamp at the start of the course doesn’t seem to be working for me.

The connection string on the mondoDb.Atlas site is not the same as the one provided by FreeCodeCamp.



This is the connection string on the mongoDB site. I’ve marked out my username with XXXXX

Log in to your Atlas account, then in the control panel, click the “Connect” button, then “Connect your application”. This will give you your connection string. Just substitute your password where it says <password>.

My password contains a ‘?’. Does that need to be encoded differently. This code is at the top of my app.js file and its still not working.

var mongodb = require(‘mongodb’);
const mongoose = require(‘mongoose’);
mongoose.connect(process.env.MONGO_URI, {useNewUrlParser: true});

All solved! Had to change a part of my password to its hexadecimal equivalent!!!