For more than 2 weeks , struggling
https://boilerplate-mongomongoose-19.rolag.repl.co/
** Back End Development and APIsMongoDB and Mongoose
Install and Set Up Mongoose*Please What Am I doing wrong?
Your project link(s)
solution: https://replit.com/@rolag/boilerplate-mongomongoose-19
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Challenge: Install and Set Up Mongoose
Link to the challenge:
Sky020
2
Hello there,
I am not sure how you managed to create a .env
file in Replit, as they recently (beginning of the year) stopped allowing this.
As such, you should be using the SECRETS
tab within Replit to create and store your environment variables.
I do not think Replit does anything with .env
files any more - they might as well not exist.
Hope this helps
no, it isn’t helpful at all!
I forked your proejct on replit and was able to find the issue.
I tried running your code with your mongo credentials but got an error concerning the database name.
When I tested it using my mongo credentials the tests were able to pass.
You will need to create a new mongo uri without any special characters in the password or username.
Right now your username has a dash in it.
RoLag2021-practice
Create a new mongo URI with only letters and numbers.
After you create the new mongo uri, click on the lock icon to the left of the screen, and add it to the secrets tab like this
Click on Add new secret
Then you can go ahead and delete that .env file you created

2 Likes
system
Closed
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.