A Get request to /profile should correctly redirect to / since we are not authenticated

A Get request to /profile should correctly redirect to / since we are not authenticated
0

This is my project but it still doesn’t work.
Glitch: https://glitch.com/edit/#!/cherry-king-j4bzqjwt1p?path=server.js:80:29

Which challenge (tell us the url) are you working on?

What tests are failing?

What errors (if any) are you seeing in the Node console and/or browser console?

Fri, 14 Feb 2020 00:39:53 GMT express-session deprecated req.secret; provide secret option at server.js:44:3

4:39 PM

Database error: MongoParseError: URI malformed, cannot be parsed

4:39 PM

Listening on port 3000

You did not answer all three of my questions above.

Do you have your project on Glitch? If so, please post a link to it.

Thank you.

Challange: Advanced Node and Express - Create New Middleware

Fri, 14 Feb 2020 00:39:53 GMT express-session deprecated req.secret; provide secret option at server.js:44:3

4:39 PM

Database error: MongoParseError: URI malformed, cannot be parsed

4:39 PM

Listening on port 3000

Glitch Project Link : https://glitch.com/edit/#!/cherry-king-j4bzqjwt1p?path=server.js:1:0

Since I can not see your DATABASE environment variable in your .env file (which you should not post here), I can only guess you either assigned an invalid URI or you have not surrounded the URI with quotes. An example of a properly quote URI would be:

DATABASE=‘mongodb+srv://databaseUsername:databasePassword@clusterName-wxevj.mongodb.net/test?retryWrites=true&w=majority’

Successful database connection

5:55 PM

requested

it still doesn’t pass the test.