I am not able to connect mongodb
vivek849
TRIALOP

2 years ago

MongoAPIError: URI must include hostname, domain name, and tld

at resolveSRVRecord (C:\Users\HP\Learning\NodeJS\youtube-blog\node_modules\mongodb\lib\connection_string.js:37:15)

at MongoClient._connect (C:\Users\HP\Learning\NodeJS\youtube-blog\node_modules\mongodb\lib\mongo_client.js:177:74)

at MongoClient.connect (C:\Users\HP\Learning\NodeJS\youtube-blog\node_modules\mongodb\lib\mongo_client.js:141:40)

at NativeConnection.createClient (C:\Users\HP\Learning\NodeJS\youtube-blog\node_modules\mongoose\lib\drivers\node-mongodb-native\connection.js:314:16)

at NativeConnection.openUri (C:\Users\HP\Learning\NodeJS\youtube-blog\node_modules\mongoose\lib\connection.js:823:34)

at Mongoose.connect (C:\Users\HP\Learning\NodeJS\youtube-blog\node_modules\mongoose\lib\mongoose.js:447:15)

at Object. (C:\Users\HP\Learning\NodeJS\youtube-blog\app.js:13:10)

at Module._compile (node:internal/modules/cjs/loader:1376:14)

at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)

at Module.load (node:internal/modules/cjs/loader:1207:32) {

[Symbol(errorLabels)]: Set(0) {}

}

View Deploy details

> ⓘ Deployment information is only viewable by project members and Railway employees.

Closed

1 Replies

2 years ago

You would need to read you mongo clients documentation for the correct syntax, unfortunately we can't help here as we aren't able to offer coding help.


Status changed to Closed brody almost 2 years ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...