Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to mongose #1

Open
cuzzysoft opened this issue Feb 13, 2023 · 1 comment
Open

Cannot connect to mongose #1

cuzzysoft opened this issue Feb 13, 2023 · 1 comment

Comments

@cuzzysoft
Copy link

cuzzysoft commented Feb 13, 2023

MongooseError: The uriparameter toopenUri()must be a string, got "undefined". Make sure the first parameter tomongoose.connect()ormongoose.createConnection() is a string.
At line 15: await mongoose.connect(process.env.MONGO_URI);
I got this error while starting the server. How do I setup and connect to the mongose database please?

@ogbodotg
Copy link
Owner

Hello,

There's a .env file which contains the MONGO_URI i used for this project. It is not publicly available because it is supposed to be kept secret.

To solve this problem, you'll have to either create a .env file and then add your own MONGO_URI. You can get it from your MongoDB Account.

If you need further help with this, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants