#getting connection string error

16 messages · Page 1 of 1 (latest)

solemn hare
#

How are you passing it?

storm palm
#

nvm i have fixed it

#

sorry

solemn hare
#

No worries man 💪

storm palm
#

wait

#

wtf

#

it worked then again

#
MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"```
storm palm
solemn hare
#

Like .connect…?

#

Show that part

storm palm
#
        await mongoose.connect(config.mongodb || '', {
            keepAlive: true,
        });

        if(mongoose.connect) {
            console.log('Mongoose Connected!')
        }```
solemn hare
#

Probably because you pass ‘’ if there isn’t anything there

#

Just log config.mongodb lol

#

Make sure things are saved too

storm palm
#

ok