Problem with Mongoose + auth

Hi i followed the mongoose example provided by denoland, but if my local database has authentication, mongoose not connect (it freeze on connect statemment) example: https://github.com/denoland/examples/tree/main/with-mongoose
import mongoose, { model, Schema } from 'npm:mongoose@^6.7';

const dinosaurSchema = new Schema({
name: { type: String, unique: true },
description: String,
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now },
});

const Dinosaur = model('Dinosaur', dinosaurSchema);

// await mongoose.connect('mongodb://localhost:27017');

await mongoose.connect('mongodb://username:password@localhost:27017');

// Check to see connection status.
console.log(mongoose.connection.readyState);

console.log(await Dinosaur.find());
import mongoose, { model, Schema } from 'npm:mongoose@^6.7';

const dinosaurSchema = new Schema({
name: { type: String, unique: true },
description: String,
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now },
});

const Dinosaur = model('Dinosaur', dinosaurSchema);

// await mongoose.connect('mongodb://localhost:27017');

await mongoose.connect('mongodb://username:password@localhost:27017');

// Check to see connection status.
console.log(mongoose.connection.readyState);

console.log(await Dinosaur.find());
Note: same URI works with node + mongoose
UU
Unknown User522d ago
J
Jess182522d ago
right @spam.wizrad
UU
Unknown User522d ago
J
Jess182522d ago
Default, i just set MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOTPASSWORD on my docker image as documentation says https://hub.docker.com//mongo if i try to connect to mongo atlas with SCRAM auth, give me another problem @spam.wizrad Uncaught MongoAPIError: Server record does not share hostname with parent URI
UU
Unknown User504d ago
More Posts
deno_core run files concurrentlyIs is possible to run multiple files concurrently using the `deno_core` crate?deno.lock multiple entry point best practicesHi, I just upgraded to 1.28.0 and realized that lock files are here by default for deno.json config About performanceif a function takes only one paramater and i pass unnecessary additional parameters would it affect deno_core Extension with Global AccessIs there a way to make a Deno Extension be accessed by `Extension.op()` instead of `Deno.core.ops.opHow to stop reading from a ReadableStream?```js let user for await (const data of readable) { if (data.user.id === 'user-id') { user = Deno.inspect, how to log class instances with gettersim trying to log a class instance that has getters in it, with `Deno.inspect` ```ts Deno.inspect(clhow to ssr preact (without fresh)i tried with preact render to string but it wouldnt ship any jsSynchronous read single line from Deno.stdinHi, how would I go about reading a single line from `Deno.stdin` synchronously?axios gives me a CORS error, fetch doesn't. Why is that?NODE ```ts import axios from 'axios'; let res = await axios('https://example-29544e.webflow.io').catLearning how this works under the hoodRecommended resources to learn how this stuff works that can be understood by a dummy without a backClosing a websocket server in a unit testHello, I'm an author of [rpc lib](https://github.com/deno-libs/rpc) and I'm currently writing unit tError The deployment failed Module not found> Error The deployment failed: Module not found "npm:@coingecko/cryptoformat". Link to module: httpHow to cancel or abort .pipeTo()?I prefer not asking, but after I found (what I consider) an MDN easter egg, I realized this is probais it possible to change how tsx bundles to js?So I’m wondering if it’s possible to get Deno to convert ```jsx <div class="test">Potato</div> ``` tcan't load external modules when run as child process with Deno.spawnChildHi! This is really weird, but I'm trying to run deno scripts under another deno process with Deno.spFile line operationsHello, How to perform the following file manipulations in Deno ? - Read the nth line - Remove the