Need Help - APIs and Microservices Projects - URL Shortener Microservice

Tell us what’s happening:
I had a successful connection to Mongoose few days ago while working on this project. Now, it shows no connection. I noticed some of the syntax changed for the new version, but glitch delivered the project already set up with an older version. Please help me to figure out how to fix the connection.
Also, please review my code for the challenge and provide feedback. I didn’t get to test it before I lost connection to Mongoose.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36.

Challenge: undefined

Link to the challenge:

is your URI in the .env in quotes?

Does this help?

  mongoose.connect(process.env.MONGO_URI).then(
    () => {
      console.log("Successfully Connected To Database");
    },
    err => {
      console.log("connection error: ", err);
    }
  );

Thank you for your help! I followed your advise, and I received this message on the console:

connection error: Error: Invalid mongodb uri “mongodb+srv://linaquintero…/”

Must begin with “mongodb://”

It is telling me that the URI that I copied directly from mongoDBAtlas shouldn’t have the "+srv…

Should I update the Mongoose version on the package.json? The project came loaded with
“mongodb”: “^2.2.5”,
“mongoose”: “^4.5.7”,

However, I also received this connection message:
(node:1833) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/4.x/docs/connections.html#use-mongo-client

I’m thinking maybe I should upgrate the mongoose package to 4.11.0?